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
how to get a list of all tables in a database? : Sql dba
Why commit is not used in triggers?
Is sql better than access?
Explain mutating table error.
What are primary key and foreign key and how they work?
Are stored procedures compiled?
explain advantages of innodb over myisam. : Sql dba
What is materialized view. What are different methods of refresh?
Differentiate between sga and pga.
What are the two virtual tables available at the time of database trigger execution?
What is relationship? How many types of relationship are there?
What are the two types of periodical indexes?
How much does sqlite cost?
How do I find duplicates in the same column?
Is postgresql a server?