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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of the sql select top clause?

645


How can you know that statistics should be updated?

720


Why do we use subquery?

598


Can you do multiple joins in sql?

636


what does the t-sql command ident_current does? : Transact sql

633






What company owns postgresql?

648


Explain the steps needed to create the scheduled job?

651


What are types of indexes in sql?

637


What are all the ddl commands?

753


What is the life of an sql statement?

615


How can we optimize a sql query?

664


Why use truncate instead of delete?

634


What is before trigger?

658


Which sql most popular?

656


Are subqueries faster than joins?

650