WGUl D427l Pre-l Assessmentl (Newl 2026/l
2027l Update)l Datal Managementl –l
Applications|l Questionsl &l Answers|l
Gradel A|l 100%l Correctl (Verifiedl
Solutions)
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
Writel al SQLl statementl tol updatel thel Yearl valuel tol bel 2022l forl alll booksl withl al Yearl
valuel ofl 2020.
Answer:
UPDATEl Song
SETl Yearl =l 2022
WHEREl Yearl =l 2020;
QUESTION
Whichl queryl illustratesl performingl anl outerl joinl ofl thel Moviel tablel withl al differentl
table?
-l SELECTl M.Title,l A.Namel FROMl Moviel M,l Actorl A
WHEREl M.ActorIDl =l A.ActorID;
-l SELECTl M.Title,l A.Namel FROMl Moviel M,l Actorl A
WHEREl M.ActorIDl =l A.MovieID;
-l SELECTl M.Title,l A.Namel FROMl Moviel Ml RIGHTl JOINl Actorl A
ONl M.ActorIDl =l A.ActorID;
-l SELECTl M.Title,l A.Actorl FROMl Moviel M
INNERl JOINl Actorl Al ONl M.ActorIDl =l A.ActorID
,Answer:
SELECTl M.Title,l A.Namel
FROMl Moviel M
RIGHTl JOINl Actorl Al ONl M.ActorIDl =l A.ActorID;
QUESTION
Assumel therel arel twol tables,l Al andl B.
Whichl rowsl willl alwaysl bel includedl inl thel resultl setl ifl Tablel Al isl innerl joinedl withl
Tablel B?
a.l Onlyl rowsl inl Tablesl Al andl Bl thatl sharel thel joinl condition
b.l Alll rowsl inl Tablel B
c.l Alll rowsl inl Tablel A
d.l Onlyl rowsl inl Tablesl Al andl Bl thatl dol notl sharel thel joinl condition.
Answer:
Onlyl rowsl inl Tablesl Al andl Bl thatl sharel thel joinl condition
QUESTION
Thel databasel containsl al tablel namedl Book.
Writel al SQLl queryl tol returnl alll datal froml thel Bookl tablel withoutl directlyl referencingl
anyl columnl names.
Answer:
SELECTl *l
FROMl Book;
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
, Writel al SQLl queryl tol retrievel thel Titlel andl Genrel valuesl forl alll recordsl inl thel Bookl
tablel withl al Yearl valuel ofl 2020.l Ensurel yourl resultl setl returnsl thel columnsl inl thel
orderl indicated.
Answer:
SELECTl Title,l Genre
FROMl Bookl
WHEREl Yearl =l 2020;
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
Writel al SQLl queryl tol displayl alll Titlel valuesl inl alphabeticall orderl A-Z.
Answer:
SELECTl Title
FROMl Book
ORDERl BYl Titlel ASC;
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
Writel al SQLl queryl tol outputl thel uniquel Genrel valuesl andl thel numberl ofl booksl withl
eachl genrel valuel froml thel Bookl tablel asl GenreCount.l Sortl thel resultsl byl thel Genrel inl
alphabeticall orderl A-Z.l Ensurel yourl resultl setl returnsl thel columnsl inl thel orderl
indicated.
Answer:
SELECTl Genre,l COUNT(*)l ASl GenreCount
FROMl Bookl
2027l Update)l Datal Managementl –l
Applications|l Questionsl &l Answers|l
Gradel A|l 100%l Correctl (Verifiedl
Solutions)
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
Writel al SQLl statementl tol updatel thel Yearl valuel tol bel 2022l forl alll booksl withl al Yearl
valuel ofl 2020.
Answer:
UPDATEl Song
SETl Yearl =l 2022
WHEREl Yearl =l 2020;
QUESTION
Whichl queryl illustratesl performingl anl outerl joinl ofl thel Moviel tablel withl al differentl
table?
-l SELECTl M.Title,l A.Namel FROMl Moviel M,l Actorl A
WHEREl M.ActorIDl =l A.ActorID;
-l SELECTl M.Title,l A.Namel FROMl Moviel M,l Actorl A
WHEREl M.ActorIDl =l A.MovieID;
-l SELECTl M.Title,l A.Namel FROMl Moviel Ml RIGHTl JOINl Actorl A
ONl M.ActorIDl =l A.ActorID;
-l SELECTl M.Title,l A.Actorl FROMl Moviel M
INNERl JOINl Actorl Al ONl M.ActorIDl =l A.ActorID
,Answer:
SELECTl M.Title,l A.Namel
FROMl Moviel M
RIGHTl JOINl Actorl Al ONl M.ActorIDl =l A.ActorID;
QUESTION
Assumel therel arel twol tables,l Al andl B.
Whichl rowsl willl alwaysl bel includedl inl thel resultl setl ifl Tablel Al isl innerl joinedl withl
Tablel B?
a.l Onlyl rowsl inl Tablesl Al andl Bl thatl sharel thel joinl condition
b.l Alll rowsl inl Tablel B
c.l Alll rowsl inl Tablel A
d.l Onlyl rowsl inl Tablesl Al andl Bl thatl dol notl sharel thel joinl condition.
Answer:
Onlyl rowsl inl Tablesl Al andl Bl thatl sharel thel joinl condition
QUESTION
Thel databasel containsl al tablel namedl Book.
Writel al SQLl queryl tol returnl alll datal froml thel Bookl tablel withoutl directlyl referencingl
anyl columnl names.
Answer:
SELECTl *l
FROMl Book;
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
, Writel al SQLl queryl tol retrievel thel Titlel andl Genrel valuesl forl alll recordsl inl thel Bookl
tablel withl al Yearl valuel ofl 2020.l Ensurel yourl resultl setl returnsl thel columnsl inl thel
orderl indicated.
Answer:
SELECTl Title,l Genre
FROMl Bookl
WHEREl Yearl =l 2020;
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
Writel al SQLl queryl tol displayl alll Titlel valuesl inl alphabeticall orderl A-Z.
Answer:
SELECTl Title
FROMl Book
ORDERl BYl Titlel ASC;
QUESTION
Thel Bookl tablel hasl thel followingl columns:
ID—integer,l primaryl key,l auto_increment
Title—variable-lengthl string
Genre—variable-lengthl string
Year—integer
Writel al SQLl queryl tol outputl thel uniquel Genrel valuesl andl thel numberl ofl booksl withl
eachl genrel valuel froml thel Bookl tablel asl GenreCount.l Sortl thel resultsl byl thel Genrel inl
alphabeticall orderl A-Z.l Ensurel yourl resultl setl returnsl thel columnsl inl thel orderl
indicated.
Answer:
SELECTl Genre,l COUNT(*)l ASl GenreCount
FROMl Bookl