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

how to increment dates by 1 in mysql? : Sql dba

635


Is sqlite good enough for production?

654


what is log shipping? : Sql dba

713


Why use stored procedures?

685


What is constant in pl sql?

605






What is a pragma statement?

832


What is snowflake sql?

693


What is cursor in pl sql?

676


How do you declare a constant?

621


What is normalisation in sql?

650


What is transaction control language (tcl)?

746


How do you create a db file?

603


What is the starting oracle error number?

646


How do you know if a relationship is 2nf?

604


What is cte sql?

613