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 |
what are all the different types of indexes? : Sql dba
Explain two easy sql optimizations.
I have one Excel file with 1,50,000 Records. Now I need to load that whole file into Oracle Database with same columns in Excel sheet . I need PLSQL Procedure or used by SQL PLUS
What are all the ddl commands?
How to connect a sql*plus session to an oracle server?
Give which cursor is better for better performance means type of cursors?
Is there a 64 bit version of ssms?
What is pivot in sql?
What does sign mean sql?
Can a foreign key be null?
Can we create index on primary key?
What is sql stand for?