to count the number of customers by the cities they live in (that is 2 in Fort W
ID: 3807652 • Letter: T
Question
to count the number of customers by the cities they live in (that is 2 in Fort Worth, 3 in San Antonio... etc)
to count the number of customers by the cities they live in but your report should be in decreasing order of customer count
NMySQL workbench New toy db) New (classwork3 280 unconnected File View Query Database Server Scripting SQL Fi SQL File 4 SQLAdditions Navigator SCHEMAS Jump to t Falter Rows wrap Cell Contenta Result Grid Filter objects Customer1 LastName Fr stiame EmalAddress City Aphone A StreetAddress State 21P Encrypted Automatic context help is disable 3-7 Kathe Kathy Foxtrottsomewhere com 972-233-6234 1023 Elm Street Foxtrot Dalas 75220 Use the toolbar to manually get help for the current caret positio Jacobs Chantel Chantel Jacobsesomewhere.com Fort Worth 817-871-8234 550 East Palm Drive TX 76112 b65TG03f classwork 3 28 to toggle automatic help. Tables Eagleton Sam Sam Eagletoneelsewhere.com San Antonio 210-281-7765 789 Pine Street 78218 E contact Hulett Shawn Shawn Huletteelsewhere.com Port Worth 972-233-6456 13045 Flora 75224 custome Ranger gsomewhere.com 56 East 18th Street Ranger Terry Te 12-974-4455 78712 Col Indexes Joan Wayne Eelsewhere, com Fort Worth 817-871-8245 1660 South Aspen Dr TX 76115 )W4TX6g Wayne Foreign Key Pearson Bobbi Bobbi. Pearson elsewhere 512-974-3344 43 West 23rd Street TO 787 kg6N200p Triggers George Sally,George Somewhere.com Dallas 972-233-6345 12034 San Jacinto 75223 ne item Ralph Ralph Ablegsomewhere.com 123 Elm Street 78214 m56fGH08 San Antonio 210-281-7987 p oduct Nancy Nancy, Jacobs Csomewhere.com Fort W 817-871-8123 440 West Palm Drive 76110 EE seminar customer Susan Baker relsewhere.com 456 Oak Street San Antonio 210-281-7876 78216 views 11 Jenny Tyler Somewhere com Dallas 972-233-6567 4056 South Erway S TX 7522S Yube 772 enny stored Procedures nctions hsd Context Help customer 1 X snippets hsd2 Tables views stored Procedures Action output nctions Duration/Fetch Management Schemas 217 22.58.28 select count0 from customer where aty Forth Worth'. Dalas, San Antonio', Auston' group. EmorCode: 1064. You have an errorin your SQL syntax check the manual that comespond. 0.000 sec Information 218 225828 select count from customer where aty-Forth Worth'. Dalas. San Antonio Auston' group Emor Code: 1064. You have an emorin your SQL symtax: check the manual that comespond 0.000 sec Schema: classwork3_28 O 219 22:58:44 select count from customer where City Forth Worth"Dalas"San Antonio Auston' group b... 0 row (s) retumed 0.000 sec /0.000 sec 220 2259:01 select countCty from customer where Cry-Forth Worth Dallas San Antonio'Auston grou... 0 rowts) retumed 0.000 sec /0.000 sec O 221 2300.07 ExPLAIN SELECT FROM classwork3 28 customer OK 0.000 sec Q 222 23.0008 EXPLAIN FORMAT-JSON SELECT FROM asswork3_28 customer 0.000 sec OK Object Info Export resultset canceledExplanation / Answer
1)SELECT city, COUNT(CustomerID) as "Number of Customers" FROM customer GROUP BY city Order By city;
2)SELECT city, COUNT(CustomerID) as "Number of Customers" FROM customer GROUP BY city Order By customer DESC;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.