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
Answers were Sorted based on User's Feedback
Answer / tulsi
four rows will be returned displaying null as the last row
| Is This Answer Correct ? | 13 Yes | 1 No |
Answer / gvmahesh
4 rows
1.vanilla
2.chocolate
3.strawberry
4.null
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / shilpa.oracle
3 Rows.
Because group functions ignore NULL values.
flavour sum(ice_cream_sales)
vanilla 10
chocolate 27
strawberry 8
| Is This Answer Correct ? | 2 Yes | 5 No |
How to trace the errors in pl/sql block code?
Table Order_Name has a column Order_Date which gives the date & Time at which the order is passed.Find the table to write a query to find out the latest order.
How many unique keys can a table have?
Can u create a primary key with out unique index.
How you will create Toad Function?
How do I copy a table in sql?
What is difference between % ROWTYPE and TYPE RECORD ?
What is the difference between a query and a report?
What are hotfixes and patches?
What are the different types of joins and explain them briefly.
what is oracle database ? : Sql dba
What is the use of function "module procedure" in pl/sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)