0% found this document useful (0 votes)
6 views

Output SQL script_cars24

The document contains SQL queries and commands related to a database of refurbished cars, focusing on various attributes such as engine capacity, price, and manufacturer details. It includes commands to select, describe, and filter data from the 'staging_refurbished_cars' table. Additionally, it provides aggregated data on listings and average prices grouped by different criteria like manufacturer and location.

Uploaded by

Prabhu Ingole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views

Output SQL script_cars24

The document contains SQL queries and commands related to a database of refurbished cars, focusing on various attributes such as engine capacity, price, and manufacturer details. It includes commands to select, describe, and filter data from the 'staging_refurbished_cars' table. Additionally, it provides aggregated data on listings and average prices grouped by different criteria like manufacturer and location.

Uploaded by

Prabhu Ingole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 20
Novator — * BEF $20 1B1O © [Rm ‘eiF Qs 8 herince = ee 24 select *from staging refurbished corsy > ecivecaoecty 7 $B ceomestoos 26% DLSCREOE staging refurbished cores Brew 2p B Scoronane >om |e |) rae tne BY Ivar cit TE [navome [_ [Menfoctrevarent Det “Inds Leestons ods) OetaresTrselet FucLTipe Ergne_Cossaty Treason Pree Dut ards Ove Via Lona ee aon reed “atone i fee One WRAL De ‘ss zo feos a9 ‘Meare tna Nes CneRewm WPLSHTEC Dupe «BO? 2D fees 09 feral sen ‘Sak Gite aye feet toa tot tee Note Wie Fa ior emo feed ‘tone: 2000 de Ge We Anbc6 Dupe feed an ‘took: at Wards Ove WiAnate6Dew ‘ss m0 feos a9 ‘tune ito Noy Gale Elmtes ses om feos ‘took ane cae ae Bo ee ome tout 70 teen eS sor BE ox mes 30 ‘tose 200 ———p Wome kde OS mer Bom fea 00 ‘atone S003 Wenbs faeo Secret Dan) Set a0 nnd 35000 ss Sax oeywaye Frnno ee ost feo Ba Ihsooxe im Toes nec nam Ges) = ‘hemes 0509 poctecemed | fan mo mm or kaw mest nut sau Si Gite mmtanon Dane mea ao art smc Saw in WAG aor ar) fant Jo ows acm ea mer mol xo oe Sm Iaroesxe sn oes maa = mol tame a) faamese ‘Ss sae ok mer mh Sham wes ta venat Ta Sak tain ser ma fed hed oxo Saw ee meron fea sa Ito esc Toye Coda Gian 3. aps IS beet tm ‘hose em en er) Seed Jaemete 509 Tome PSD Ser oh Sn Sea 3 Mee teen ows eb ea ser BOL te oa mate Sera seared 4 ouecive (seisen Cut anigator SCHEMAS ° iter objects VB Tables > El engine_capacity > B views staging_refurbis {BF stored Procedures "BS Functions > Dove ‘Administration Schemas 1nformation No object selected Object Info ‘Session way #fAC BIC 0f 23 | Dont Lint 24@ select *from staging_refurbished_cars5 2s 26 © DESCRIBE. staping_refurbished cars] 7 | ment id |} ta Rows: Rests x Output HHAAAATHHSle [econ y [Wop ea contr TE Oefaut niger seovems ° BEF FROBOOMmm -avaie rites is 1S BF sce seg retin > Hd en 08 FB ee 20 © SELECT * row staging. refurbished cars tart 10j) See » B socirccrtres Broce Sen | ince oat | TA tr nes [spn ify |wrapeat conan: FE a a Vous Geka we 2D red 0 ‘ora on foe Ge imamate Se ie red 0 Nee om owe GecRton Yrsonsc mesa? toh tet co Soon cae eae ac ae a red eo fot enon tone Wea Se ksi ted onc Sn fons ae navomascie oe se a rede ‘oun inn Noes fe hanna are tae tert Seen ota Coot Sin mr tot rod foun tn cnt Gor = om im rod Poy cme ome oan oom ret te feomic mn sntomanon No object selected woe IL — ° BEF €ROC'B1O OB) mu “lei Q 0s iter obec 32° WHERE Price INR NOT REGEXP "*[0-9]+(\.[0-9]+)?8's ve ss 33 Sain . sce Stn my tS ISTP rae) See meee Bviews 36 onoen sy Price za {BP Stored Procedures Bi Funcions: ross ‘Result Grid |] Fiter Rows: [export Big | wrap cel Contant: TE | Fetch rowss » Administration Scheras formation No object selected staging reucbihed_e7 x ‘objec Info Session Output sores * BEF £2 O18) OC OB) omni “ei 9Q08 bd 62 ‘WHERE Engine_Capacity = 25 yG an e ‘VA Tabies 64 © SELECT Model, Details, Varient, Engine Capacity > BB engine capacity TE ityassatcne 65 FRO" staging refurbished cars B views 66 ‘HERE Engine_Capacity > @ Pisonarecedves fe © SUP OY Models DetnilayVarkenty Engine Capcity >Sms Lats Hy [wap coco: I |tethrom: 5 ™ ™ a ” ™ Roce 2 25 3 20 1 25 a 2500 —— 1967 1100 SeateFoxy 1100 Aarinitraton Schemes 1367 1600 oecte 1500 167 Sundae 20 wfomaton a ee 1953 Sunded 200 No object selected 1969 1309 ecto Foxy 1200 1989 1600 Beate Foxy 1500 we 25 a 2500 0 x13 cola im 3m 20 Beet Foxy 1200 sm 190 0 37 120 eet Foxy 1200 sm 120 Secte ia sm 1972 0 sm 25 ° 20 92 Mak coro 1600 3 109 ecto Foxy 1200 staging refurbished cae 2 x object nfo | Session vp a SCHEMAS ° BEF €AO'1S/O OR) oun “lei ¥ QA 08 Frter objects 94 © — SELECT COUNT(*) AS Rows_With_Zero_Engine_Capacity 95 FROM staging _refurbished_cars VEN Tables 1 apscry %6 WHERE Engine Copecity = 6 > BD staging refurbis 97 views 90:6 DeLeUIsree statagireroritanecenes EN stored Procedures 9 here Engine Capacity = {BR Functions: ent > sys | Resuie ri | ¢% Fer Rows: [exons Ey | wrap cet content: TE Rows_Wth Zero, Engne_Capacity a0 ‘Administration Schemas Information No object selected Navigator cman * BEF FAO HOO 8 rer ets = yaar ore seueer * Md ne eecapncty 382 FROM staging refurbished card SE songetoty 362 WHERE MOT Engine capacity REGEXP °°[0-9]+5"s Bview 108 Br awredrocedwes sos 6 et st i Brecon: Poe onan aisha > oan | near | il) Parse [com fi [vp ot comet EE ‘nfornation [Meweckrer Veet Det Io octes Med OxunceToveed FuelTpe Ene Cescly Taraneion Pree Navigator: SCHEMAS, ° 4 Fiter objects vG crs vB tables > BB engine capacity » EB staging_refurbie BS views |B stored Procedures BF Functions > sys ‘Administration Schemas Information No object selected GEF #2 OO OR om 106 WHERE NOT Engine Capacity REGEXP ‘*[0-9]+5's 107 203 © SELECT 109 ne un raha, teset, aa lei OM | Result Grid | Hl] A) Fiter Rows: 1996 1040000 1600 223000 1936 10400001600 223000 2007 19000001800 212000 2012 1465000 1000 1 2003 2500000 1300 240000 1996 10400001800, 223000 1996 10400001600 223000 1994 1820000 1500, 1190000 2003 750000800 100000 2mi2 2800000 660 ‘0000 2011 3300000 1500 160000 41980 950000 2500 190000 2014 2100000 660 99554 2003 8300000 4200 1125000 mez 2520000660 13000 2016 16720001000 51000 2003 760000800 135000 2001 4950000 3000 130000 2001 950000 3000 130000 2019 2200000 660 1116000 | sport Fy [Wee Ct contents EE Engne_cepecty Dstance_javeled Inds jocstons EEEELEEEEE PEEL EG EEE? navigator: soHeaas ° BEF $20 1B10 ©) omu ‘i elF QOS Ptr cis 158° FROM staging_refurbished_cars "ie 159 MERE CAST(SUBSTRING_INDEX(Details, ° ', 1) AS UNSIGNED) >» 26155 VER ble 7 > BE engine_cor > staging refurir 161° SELECT Bi views 162 Manufacturer, z solos | is COUNT(*) AS Totel_Listings, ia ue svc(Price_3¥m) AS Avg Price 165 FROM staging refurbished cars 366 GROUP By Manufacturer 167 ORDER BY Total Listings DESC; 168 | Result Grid | JY €) Fiter Rows: |[Bmort: Egy | weap cel Contents EE y foie aaa aera Sink Dios sosaptenses vende aeRO GEBOSIEL Carats a7. 215108 aaa oe elm buss esses finns ame ZDOITD ioral Meson 1) SBME Geum 98 sar sae7ea wo obctsdetna | (abst 8 preter Mecdes at ‘one ssriones we os 7ae38.0828003 rr) ‘Mose 209082 too awoen saces froma eee pasen ams sseonen anaes Cx samo raw raspeszeresene lus 7 sretsra ines rine ts siesasreni3831 Tremeot tse ‘awersons077 Chery 106, (844009,439962265 anit x Object info | Sesion Out Navigator: ue eo ° GBIF FAO BO 166 GROUP BY Hanufacturer VG cars 167 ORDER BY Total Listings DESC; ‘VBE Tables a >) maine cnscey PE sagna.rfubs 269 ¢ SELECT Bom -% ¥A0e BR Views 370 Indla_Locations AS Location, & a a7 COUNT(*) AS Total_Listings, Om wm AvG(Price INR) aS Avg Price 273 FROM staging refurbished cars 274 GROUP BY Location vs Listings DESC: 176 | mesuit Grid | {) €% FterRows: | Export: Sif | Wrap cat Content: TE locaton Tota isnge Avg Pe > loch 7am 5770188.739203085, mba 080 3116531052408, Mahbuinagar 13682 ———_-5855268.255470071 Kohat 502 3526191. 3588935418, —— ad 33 3726507. 695375755, fangare Ht 5877285.2718627 Information (Crema 2561 4323435.006831587 WHvderebod 2110, 795160.285061729 sta Weongam 1321 srsrw7 aTa08 wngee ‘suatgah 82 338960.625 larmedabed 734 serra 21128285 vecairee 74 3054038. 5755576556 dane ss 7786210.9833735538 Nendyel At +163742.5097035083 washes 602 2981666 128568107 lahape 530 soszz. 754738561 Peta 2s 2863507.878787579 ‘Soogammer 378 srsiaxs 25925526, aero 35k 619162.293162393, ante 32 2e0833.74038759 \cobchetipal.. 328 sean 12195122 esule 17 x objec info. | Selon Output Navigator: scueMas ° @el | "San 2 VB Tables a > BB engine capacity > BB staging refurbis 275 ¥#FACBOCO ‘AvG(Price_INR) AS Avg Price FRON staging refurbished_cars ‘GROUP BY Location ‘ORDER BY Total_Listings DESC sevect Distance Travelled, ‘ave(Price IMR) AS Avg Price FROM staging refurbished_cars WHERE Distance Travelled IS NOT NULL GROUP BY Distance Travelled Bi views 176 Bi storedrrocedues 377 @ {BS Functions >a are a9 180 181 182 | Recut rid a [| Distance Traveled Avg Price [D> reerrows: [tempor ify | wrap cet Content: A | Fetch rows: 7152289, 002557545 {toate osezss3 {100 5039835. 164835165 100 zis eszi7912 ey ce | seizes toon 2ivisi scones Information: 1900000 909666, 6666666666 smoot ‘son0 aettciieed |__| noms on000 = 100005 5100000 sooo sate) noo 700 wove asm00 ttoom ro 0023 ‘somo 1o0035 ‘som | 100028 4550000 “ome itooon wos ‘st000 1o0087 enon toss feone fev tt x Object info | Session Output = pap ° GBIF £80816 OB) om Fer coe 200 FROM staging. refurbished cars vBon 181 HERE Distance Travelled 1S NOT MULL ‘VB Tatler 2 » BE encinecapacty > BE staring rubs 289 e Berionaten soy Forsone >on me 187 180 190 nour BY Olsterce travelled onDeR BY Distance Travelled; sevecr + ROH staging refurbished cars HERE Engine Capacity = @ ‘8 Price IMR = 0 ‘ot India Locations = “Uninoen"s ei OB | neni) raertone: Lens Gj | wan cotconnts TE [Teenie vet Agminatation Sohemss ‘efomatin No object selected Detals Inde testers Model Ostace Traveled Puc Tipe _Erone_Cooadiy Pree Da neve Gennes peed ° GEIF #2 C18! OR) mu ie QM 192 WHERE Engine Capacity = 193 ase ® SELECT 195 Manufacturer 196 Nodel, oe 197 ‘AvG(Price_INR) AS Average Price em 198 FROM staging refurbished_card 199 GROUP BY Manufacturer, Model 200 ORDER BY Manufacturer, Average Price DESC 20. 2e2 © SELECT | Recut Grid |B] 4 FiterRowas | Bevo: By | wap cet coments TE Manufactrer Model Average Pree > Adam 200s 372500 fu 2022 ssm19090 90009001 fad 202333100000 mo moi 29584615.304615304 ad — tod yom 25642957. 14285714 eaiaas mud 20196001666. ccc Information fod 218 15139285.714285715 ru 2017 13066197. 183098592 _— fo 215 11487000 SRE Aud 2012 9656666.558556566 ud wis 9182173 91009 no 20099545000 tu Boia |AoH166 566666556 uk zou e2ane00 [r) 2147710000 hud 20085660000 fuck 2005 soon000 fuck 2007 4750000 mud 10 $5000 rok 233600000 eaIc 202111000000 Result 20 x object infe | Session Ouiput Ez eee ° GEFFLOROCOM™= oe vane 200 ORDER BY NanwFacturery Average Price DESC: 2 SUBSTRING DHOEK(Oetaile, | ', 1) AS Veer, —~ Acsoning year Je in the fest a0 oUr(*) AS Total 295 FROM staging refurbished cers 296 WERE SUBSTRING_MNOEX(ONtaHRS, ©“, 3) REGERP ‘°[0-8](5}$° -- Ensure St watches 9 veltd year forest 208 GROER BY Year DESC I pen: By | wap cleo: TE ma os ma a 3 fm Admisstoton cionss | [87 2 wk emanae» un 2 om maacouessa [jee 2 = 100 0 10 9 g iceicetnet » BH/£ £50150 © © [Bl orem “le Q08 ‘Saeed | ORDER BY Year DESC von i sevect » Bl engine.capacty > staging refute Manufacturer, Views Medel, So | ae Wax(Distance Travelled) AS Max Distance Om 214 FROM staging refurbished cors 21s GROUP BY Manufacturer, Hodes] 216 ORDER BY Max Distance DESC a7 nee sevecr ed Lepr: BBY | wrap ot contets 5 > sia wy Dohetsy «-oit_——ase609 ede «7005999999 teformation Oshetss «2012989999 Honda 1550999999 ctanrieedtaa suns 2005990000 Oshetss 1804990099 Toyota 195905509 Toys 005980809, sunk 2020990999 sunk 1889990099 Toyota 1983956000, sunk 2010999999 Sun 2005959999 Sinks 1985 900009 nda «2001999999 Toyota 1999 sa5a89 ods 2014989999 Resut 2 x Object info | Session Outpt Navigator: SCHEMAS. ° Fier obec vGar ‘VIB Tables » Bl engine capacty > staging refi Bi views (Bp stored Procedures Bh runcions roe ‘Adminitation Schenae formation Mo object selected ae 27 ase 9 aaa m2 223 25° 26 9 ¥ €2O1BO O/B) oun e Oa ‘ORDER BY Max Distance DESCS sevect Fuel_types CouNT(*) AS Total_cars Rom staging refurbished cars GROUP BY Fuel_Type ‘OmDER By Total_cars DESC} sevect ase | Remit crit | Hl Fer Rowe [rus Time Total cas > eval ‘Detet bd (a6 Beene |es 75467 3301 3507 a an » | eepons ffy | wap cat conets Navigator x SCHEMAS ° iter objects ¥S ars VSP Tables > BE engine capacity > EE staging refurbit B views: (BP stored Procedures BR Functions > Oss BHF #2 O1B\O OR] omnun eis QMa 226 27 228 229 230 234 232 233 24 235 236 CASE WHEN Price INR < 100000 THEN "Below 2 Lakh’ (WHEN Price INR BETWEEN 100000 AND 500000 THEN ‘1-3 Lakhs’ WHEN Price INR BETWEEN 500001 AND 1000000 THEN "5-10 Laks" ELSE ‘Above 19 Lakhs" EO AS Price Range, ‘couNT(*) AS Total. cars RON staging refurbished cars GROUP BY Price Range ORDER BY Totel_Cars DESC | neste rd |] Fer Ronst (ets iy | wine et contents TE Admingtation Scheme Information No object selected woe xo * BaF FAO RICO “lei¥ QS parton dT VG crs 237 SELECT TE le nny DS Menwfacturery > EB staging refurbic 239 Hotel, B views 248 COUNT(*) AS Total_Count BBevreemocdves 34, sao atepig refurb core io 262 chap BY Yamifacturer, del 243 nen oy Total_cout DESC 244 UNIT 185 =~ Retrieve top 19 poplar combinations os | net | 9 rae |r: ect comme Pander red Tout caze Plone in aa Tero = Toes tat toes at roe be Sek mee cae at i No obeetseeted | sah mB toe ie Navigator - scene © BEF ££ C1910 OM) on “lei QB & Fiterobjects 2a LANIT 205 jetrieve top 10 popular combinations an 285 iS abies ase seecr > EE enaive.cpscty > BE staging refute 247 Manufacturer, B views 238 COURT¢*) AS Total_Count Bavredmcctues 349 son staging refurbished ars awe 250 GROUP BY Manufacturer 251 ORDER BY Total_Count DESC 252 LIMIT 105 253 25s © SELECT letrieve top 10 popular manufacturers | Reale Grid | [Fer Ronst | expo iil | wrap cel contents HS nemgnor © Fie bce vGorn YEH Tales > IB engine capscty > stioing refed Bivies Be sorearocedues BS runciens > Oo as Adminsiratan Scenes normaon ‘Mo object selected rented SEFFAOBOOM™™ “ia ¥A0a zee seer = me 255 COUNT) AS Tota. Count 257 FRO taping. refurbished 258 aur BF eel 253 ORE BY Total Count OFS oe MTs = Retreve ap A dE deo e seuecr 2) ABETARG_BHOEN(oetatLs, © 5 1) AS Manufacturing Year, —- Brac she year From Beale 2st f(a.) AS Averege Price, ‘Result Grid | Gl) ¢} iter Rows: Jerport: Bi | wrap Cet Content: TE [| ya a zn tes me oss au aer no a =m 4 zs

You might also like