SQL Exercises (HR Database) (SUBQUERIES)
March 27, 2023 | Author: Anonymous | Category: N/A
Short Description
Download SQL Exercises (HR Database) (SUBQUERIES)...
Description
Y_K @x`rids`s (BX Motohos`) Y_K YPH_P@XD@Y btps://www.sqkuardok.arl/sqk-soepk`-moohos`/ btps://www.w9r`sauri`.iae/sqk/uardoks.pbp#Y_KMHOY@ btps://www.w9r`sauri`.iae/sqk-`x`rids`s/sqk-suhqu`rd`s-`x`rids`s.pbp
?. \rdt` o qu`ry ta mdspkoy tb` foe` ( cdrst foe` ofm kost foe` ) car tbas` `epkay``s wba l`ts ear` sokory tbof tb` `epkay`` wbas` DM ds ?>9. Y@K@I] cdrstQfoe`, Y@K@I] cdrstQfoe` , kostQfoe` CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ sokory sokory 6 ( Y@K@I] Y@K@I] sokory sokory CXAE CXAE `epkay``s `epkay``s \B@X@ \B@X@ `epkay``Qdm `epkay``Qdm5 5?>9 )7 8. \rdt`
o qu`ry ta mdspkoy tb` foe` ( cdrst foe` ofm kost foe` ), sokory, m`porte`ft dm, jah dm car tbas` `epkay``s wba wargs df tb` soe` m`sdlfotdaf os tb` `epkay`` wargs wbas` dm ds ?34. Y@K@I] cdrstQfoe` , kostQfoe` kostQfoe`, , sokory sokory, , m`porte`ftQdm m`porte`ftQdm, , jahQdm Y@K@I] cdrstQfoe`, CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ jahQdm jahQdm 5 ( Y@K@I] Y@K@I] jahQdm jahQdm CXAE CXAE `epkay``s `epkay``s \B@X@ \B@X@ `epkay``Qdm `epkay``Qdm5 5?34 )7
9. \rdt`
o qu`ry ta mdspkoy tb` foe` ( cdrst foe` ofm kost foe` ), sokory, m`porte`ft dm car tbas` `epkay``s wba `orf suib oeauft ac sokory wbdib ds tb` seokk`st sokory ac ofy ac tb` m`porte`fts. Y@K@I] cdrstQfoe`, Y@K@I] cdrstQfoe` , kostQfoe` kostQfoe`, , sokory sokory, , m`porte`ftQdm CXAE CXAE `epkay``s `epkay``s \B@X@ \B@X@ sokory sokory DF DF ( Y@K@I] Y@K@I] EDF EDF( (sokory sokory) ) CXAE `epkay``s CXAE `epkay``s LXAP^ HT HT m`porte`ftQdm m`porte`ftQdm LXAP^ )7
=.
\rdt` o qu`ry ta mdspkoy `epkay`` dm, `epkay`` `epkay``s wba `orf ear` tb` tbof tb` ov`rol` sokory. foe` (cdrst foe` ofm kost foe` ) car okk Y@K@I] Y@K@I] `epkay``Qdm `epkay``Qdm, , cdrstQfoe` cdrstQfoe`, ,kostQfoe`
CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ sokory sokory 6 ( Y@K@I] Y@K@I] OSL OSL( (sokory sokory) ) CXAE `epkay``s CXAE `epkay``s )7 0. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` foe` ( cdrst foe` ofm kost foe` ), `epkay`` dm ofm sokory ac okk `epkay``s wba r`part ta ^oyoe. Y@K@I] cdrstQfoe` cdrstQfoe`, , kostQfoe` kostQfoe`, , `epkay``Qdm `epkay``Qdm, , sokory Y@K@I] CXAE `epkay``s `epkay``s CXAE \B@X@ \B@X@ eofol`rQdm eofol`rQdm 5 (Y@K@I] Y@K@I] `epkay``Qdm `epkay``Qdm CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ cdrstQfoe` cdrstQfoe` 5 '^oyoe' '^oyoe' )7
\rdt` o qu`ry ta mdspkoy tb` m`porte`ft fueh`r, foe` ( cdrst foe` ofm kost foe` ), jah ofm m`porte`ft foe` car okk `epkay``s df tb` Cdfofi` m`porte`ft. 3.
Y@K@I] Y@K@I] ` `. .m`porte`ftQdm m`porte`ftQdm, , ` `. .cdrstQfoe` cdrstQfoe`, , ` `. .jahQdm , m m. .m`porte`ftQfoe` CXAE `epkay``s ` , m`porte`fts m CXAE `epkay``s \B@X@ `. \B@X@ ` .m`porte`ftQdm 5 m m. .m`porte`ftQdm OFM 'Cdfofi`'7 OFM m.m`porte`ftQfoe` 5 'Cdfofi`'7 >> ofm ?8? r`sp`itdv`ky. Y@K@I] * Y@K@I] CXAE CXAE `epkay``s `epkay``s \B@X@ \B@X@ (sokory sokory, ,eofol`rQdm eofol`rQdm) )5 (Y@K@I] Y@K@I] 9>>>, 9>>>,?8? ?8?)7 )7
2. Mdspkoy
okk tb` dfcareotdaf ac of `epkay`` wbas` dm ds ofy ac tb` fueh`r ?9=, ?04 ofm
?29. Y@K@I] Y@K@I] * CXAE CXAE `epkay``s `epkay``s \B@X@ \B@X@ `epkay``Qdm `epkay``Qdm DF DF (?9= ?9=, ,?04 ?04, ,?29 ?29)7 )7 4. \rdt`
o qu`ry ta mdspkoy okk tb` dfcareotdaf ac tb` `epkay``s wbas` sokory ds wdtbdf tb` rofl` ?>>> ofm 9>>>. Y@K@I] Y@K@I] * CXAE CXAE `epkay``s `epkay``s \B@X@ sokory H@]\@@F \B@X@ sokory H@]\@@F ?>>> ?>>> ofm ofm 9>>>7 9>>>7 ?>. \rdt`
o qu`ry ta mdspkoy okk tb` dfcareotdaf ac tb` `epkay``s wbas` sokory ds wdtbdf tb` rofl` ac seokk`st sokory ofm 80>>. Y@K@I] Y@K@I] * CXAE CXAE `epkay``s `epkay``s
\B@X@ sokory H@]\@@F \B@X@ sokory H@]\@@F (Y@K@I] Y@K@I] EDF( EDF(sokory sokory) ) CXAE `epkay``s) CXAE `epkay``s ) OFM OFM 80>> 80>>7 7 ??. \rdt`
o qu`ry ta mdspkoy okk tb` dfcareotdaf ac tb` `epkay``s wba ma`s fat warg df tbas` m`porte`fts wb`r` sae` `epkay``s wargs wbas` eofol`r dm wdtbdf tb` rofl` ?>> ofm 8>>. Y@K@I] Y@K@I] * CXAE CXAE `epkay``s `epkay``s \B@X@ m`porte`ftQdm m`porte`ftQdm FA] FA] DF DF \B@X@ (Y@K@I] Y@K@I] m`porte`ftQdm m`porte`ftQdm CXAE m`porte`fts CXAE m`porte`fts \B@X@ \B@X@ eofol`rQdm eofol`rQdm H@]\@@F H@]\@@F ?>> ?>> OFM OFM 8>> 8>>)7 )7
?8. \rdt`
o qu`ry ta mdspkoy okk tb` dfcareotdaf car tbas` `epkay``s wbas` dm ds ofy dm wba `orf tb` s`iafm bdlb`st sokory. Y@K@I] * Y@K@I] CXAE CXAE `epkay``s `epkay``s \B@X@ \B@X@ `epkay``Qdm `epkay``Qdm DF DF (Y@K@I] Y@K@I] `epkay``Qdm `epkay``Qdm CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ sokory sokory 5 (Y@K@I] Y@K@I] EOR( EOR(sokory sokory) ) CXAE `epkay``s CXAE `epkay``s \B@X@ sokory sokory ; \B@X@ (Y@K@I] Y@K@I] EOR( EOR(sokory sokory) ) CXAE `epkay``s)))7 CXAE `epkay``s )))7
?9. \rdt` o qu`ry ta mdspkoy tb` `epkay`` foe`( cdrst foe` ofm kost foe` ) ofm bdr`mot` car
okk `epkay``s df tb` soe` m`porte`ft os Ikoro. @xikum` Ikoro. Y@K@I] cdrstQfoe` , kostQfoe` kostQfoe`, , bdr`Qmot` Y@K@I] cdrstQfoe`, CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ m`porte`ftQdm m`porte`ftQdm 5 ( Y@K@I] Y@K@I] m`porte`ftQdm m`porte`ftQdm CXAE CXAE `epkay``s `epkay``s \B@X@ cdrstQfoe` cdrstQfoe` 5 'Ikoro') 'Ikoro') \B@X@ OFM cdrstQfoe` ;6 OFM cdrstQfoe` ;6 'Ikoro'7 'Ikoro'7 ?=. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` fueh`r ofm foe`( cdrst foe` ofm kost foe` ) car okk `epkay``s wba warg df o m`porte`ft wdtb ofy `epkay`` wbas` foe` iaftodfs o ]. Y@K@I] `epkay``Qdm, Y@K@I] `epkay``Qdm , cdrstQfoe` cdrstQfoe`, , kostQfoe` CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ m`porte`ftQdm m`porte`ftQdm DF DF ( Y@K@I] Y@K@I] m`porte`ftQdm m`porte`ftQdm CXAE CXAE `epkay``s `epkay``s \B@X@ \B@X@ cdrstQfoe` cdrstQfoe` KDG@ KDG@ '%]%' '%]%' )7
?0. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` fueh`r, foe`( cdrst foe` ofm kost foe` ), ofm sokory car okk `epkay``s wba `orf ear` tbof tb` ov`rol` sokory ofm wba warg df o m`porte`ft wdtb ofy `epkay`` wdtb o J df tb`dr foe`. Y@K@I] Y@K@I] `epkay``Qdm `epkay``Qdm, , cdrstQfoe` , sokory CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ sokory sokory 6 (Y@K@I] Y@K@I] OSL OSL (sokory sokory) ) CXAE `epkay``s ) CXAE `epkay``s OFM DF OFM m`porte`ftQdm DF ( Y@K@I] Y@K@I] m`porte`ftQdm m`porte`ftQdm CXAE `epkay``s `epkay``s CXAE \B@X@ \B@X@ cdrstQfoe` cdrstQfoe` KDG@ KDG@ '%J%' '%J%')7 )7 ?3. Mdspkoy
tb` `epkay`` foe`( cdrst foe` ofm kost foe` ), `epkay`` dm, ofm jah tdtk` car okk `epkay``s wbas` m`porte`ft kaiotdaf ds ]arafta. Y@K@I] Y@K@I] cdrstQfoe`, cdrstQfoe`, kostQfoe` kostQfoe`, , `epkay``Qdm `epkay``Qdm, , jahQdm CXAE `epkay``s CXAE `epkay``s \B@X@ m`porte`ftQdm m`porte`ftQdm 5 \B@X@ (Y@K@I] Y@K@I] m`porte`ftQdm m`porte`ftQdm CXAE m`porte`fts CXAE m`porte`fts \B@X@ kaiotdafQdm kaiotdafQdm 5 \B@X@ (Y@K@I] Y@K@I] kaiotdafQdm kaiotdafQdm CXAE kaiotdafs CXAE kaiotdafs \B@X@ \B@X@ idty idty 5']arafta' ']arafta'))7 ))7 ?. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` fueh`r, foe`( cdrst foe` ofm kost foe` ) ofm jah tdtk` car okk `epkay``s wbas` sokory ds ear` tbof ofy ov`rol` sokory ac ofy m`porte`ft. Y@K@I] Y@K@I] `epkay``Qdm `epkay``Qdm, , cdrstQfoe` cdrstQfoe`, , kostQfoe` kostQfoe`, , jahQdm CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ sokory sokory 6 OKK OKK ( Y@K@I] Y@K@I] OSL OSL( (sokory sokory) ) CXAE `epkay``s CXAE `epkay``s LXAP^ HT HT m`porte`ftQdm m`porte`ftQdm LXAP^ )7 8?. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` foe`( cdrst foe` ofm kost foe` ) ofm m`porte`ft car okk `epkay``s car ofy `xdst`fi` ac tbas` `epkay``s wbas` sokory ds ear` tbof 9>. Y@K@I] Y@K@I] cdrstQfoe` cdrstQfoe`, , kostQfoe` kostQfoe`, , m`porte`ftQdm m`porte`ftQdm CXAE `epkay``s CXAE `epkay``s \B@X@ @RDY]Y @RDY]Y \B@X@ (Y@K@I] Y@K@I] * CXAE `epkay``s CXAE `epkay``s \B@X@ \B@X@ sokory sokory 69> 9> )7 88. \rdt`
o qu`ry ta mdspkoy tb` m`porte`ft dm ofm tb` tatok sokory car tbas` m`porte`fts wbdib iaftodfs ot k`ost af` `epkay``. Y@K@I] m`porte`fts m`porte`fts. .m`porte`ftQdm m`porte`ftQdm, , r`sukt? r`sukt?. .tatokQoet Y@K@I] CXAE m`porte`fts, CXAE m`porte`fts , ( Y@K@I] Y@K@I] `epkay``s `epkay``s. .m`porte`ftQdm m`porte`ftQdm, , YPE( YPE(`epkay``s `epkay``s. .sokory sokory) ) tatokQoet CXAE CXAE `epkay``s `epkay``s LXAP^ HT HT m`porte`ftQdm m`porte`ftQdm) ) r`sukt? LXAP^ \B@X@ r`sukt?. \B@X@ r`sukt? .m`porte`ftQdm 5 m`porte`fts m`porte`fts. .m`porte`ftQdm m`porte`ftQdm7 7 89. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` dm, foe` ( cdrst foe` ofm kost foe` ) ofm tb` jah dm iakuef wdtb o eamdcd`m tdtk` YOK@YEOF car tbas` `epkay``s wbas` jah tdtk` ds Y]QEOF ofm M@S@KA^@X car wbas` jah tdtk` ds D]Q^XAL. Y@K@I] `epkay``Qdm, Y@K@I] `epkay``Qdm, cdrstQfoe`, cdrstQfoe`, kostQfoe` kostQfoe`, , IOY@ jahQdm IOY@ jahQdm \B@F \B@F 'Y]QEOF' 'Y]QEOF' ]B@F ]B@F 'YOK@YEOF' 'YOK@YEOF'
\B@F 'D]Q^XAL' \B@F 'D]Q^XAL' ]B@F ]B@F 'M@S@KA^@X' 'M@S@KA^@X' @KY@ jahQdm @KY@ jahQdm @FM OY m`sdlfotdaf OY m`sdlfotdaf, , sokory @FM CXAE `epkay``s7 CXAE `epkay``s 7 8=. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` dm, foe` ( cdrst foe` ofm kost foe` ), sokory ofm tb` YokoryYtotus iakuef wdtb o tdtk` BDLB ofm KA\ r`sp`itdv`ky car tbas` `epkay``s wbas` sokory ds ear` tbof ofm k`ss tbof tb` ov`rol` sokory ac okk `epkay``s. Y@K@I] Y@K@I] `epkay``Qdm, `epkay``Qdm, cdrstQfoe`, cdrstQfoe`, kostQfoe` kostQfoe`, , sokory sokory, , IOY@ \B@F sokory sokory 65 65 (Y@K@I] Y@K@I] OSL( OSL(sokory sokory) ) IOY@ \B@F CXAE `epkay``s) CXAE `epkay``s ) ]B@F ]B@F 'BDLB' 'BDLB' @KY@ 'KA\' @KY@ 'KA\' @FM @FM OY YokoryYtotus OY YokoryYtotus CXAE `epkay``s7 CXAE `epkay``s 7 80. \rdt`
o qu`ry ta mdspkoy tb` `epkay`` dm, foe` ( cdrst foe` ofm kost foe` ), YokoryMrowf, OvlIaepor` (sokory - tb` ov`rol` sokory ac okk `epkay``s) ofm tb` YokoryYtotus iakuef wdtb o tdtk` BDLB ofm KA\ r`sp`itdv`ky car tbas` `epkay``s wbas` sokory ds ear` tbof ofm k`ss tbof tb` ov`rol` sokory ac okk `epkay``s. Y@K@I] Y@K@I] `epkay``Qdm, `epkay``Qdm, cdrstQfoe`, cdrstQfoe`, kostQfoe` kostQfoe`, , sokory OY OY YokoryMrowf YokoryMrowf, , XAPFM(( ((sokory sokory -(Y@K@I] Y@K@I] OSL( OSL(sokory sokory) ) CXAE `epkay``s CXAE `epkay``s)), )),8 8) OY OvlIaepor` OY OvlIaepor`, , XAPFM IOY@ \B@F IOY@ \B@F sokory sokory 65 65 (Y@K@I] Y@K@I] OSL( OSL(sokory sokory) ) CXAE `epkay``s) CXAE `epkay``s ) ]B@F ]B@F 'BDLB' 'BDLB' @KY@ 'KA\' @KY@ 'KA\' @FM OY YokoryYtotus OY YokoryYtotus @FM CXAE `epkay``s7 CXAE `epkay``s 7
View more...
Comments