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
What are functions in sql?
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
Define concurrency control. : Transact sql
What is Collation Sensitivity ? What are the various type ?
What is sql profiler in oracle?
Why do we need cursor in pl sql?
How does a trigger work?
What are the triggers associated with image items?
What is snowflake sql?
How to install oracle sql developer?
What is aggregate function in sql?
describe transaction-safe table types in mysql : sql dba
What is data type in sql?
how to do backup entire database? : Transact sql
Explain the difference between cursor declared in procedures and cursors declared in the package specification?