SELECT flavor, SUM (ice_cream_sales) FROM sales_detail
GROUP BY flavor ORDER BY 2 DESC

If the "sales_detail" table contains ten records with
different values in the flavor column (two "vanilla,"
three "chocolate," four "strawberry," and one NULL), how
many rows are returned by the sample code above?

1. 0 rows
2. 1 row
3. 3 rows
4. 4 rows
5. 10 rows

Answer Posted / kapil

It would return 4 rows

because there is also a sum of ice_cream_sales for null also

so it would return 4 rows including null with order
dependimg on the value of sum function returned .

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are sql functions? Describe in brief different types of sql functions?

498


How can I delete duplicate rows?

571


What are aggregate functions in sql?

641


What is a record in pl/sql?

556


How do I copy a table in sql?

523






explain access control lists. : Sql dba

561


What is trigger and stored procedure in sql?

565


How to use sql*plus built-in timers?

583


How to select 10 records from a table?

660


What program will open a mdb file?

507


What is normalization? How many normalization forms are there?

562


what is a scheduled jobs or what is a scheduled tasks? : Sql dba

562


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

519


What are transaction and its controls?

569


Is hadoop a nosql?

579