Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

Answer / tulsi

four rows will be returned displaying null as the last row

Is This Answer Correct ?    13 Yes 1 No

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

Answer / sdp

4 rows

Is This Answer Correct ?    5 Yes 2 No

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

Answer / gvmahesh

4 rows

1.vanilla
2.chocolate
3.strawberry
4.null

Is This Answer Correct ?    4 Yes 1 No

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

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

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

Answer / sree

3 rows

Is This Answer Correct ?    1 Yes 2 No

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

Answer / roopa

3rows'

Is This Answer Correct ?    2 Yes 5 No

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

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

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the &..

Answer / guest

10 rows

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More SQL PLSQL Interview Questions

What is trigger with example?

0 Answers  


How can I speed up sql query?

0 Answers  


When do we use triggers?

0 Answers  


Explain cursor types?

0 Answers  


What is a unique key and primary key and foreign key?

0 Answers  


What are the sql aggregate functions?

0 Answers  


What is %rowtype in pl sql?

0 Answers  


Can i use Commit inside the Trigger? Suppose i use commit what will be happy (it's complied /executed/work)

6 Answers  


What are the types of records?

0 Answers  


What is clustered and nonclustered index in sql?

0 Answers  


How does cross join work in sql?

0 Answers  


What is the basic structure of PL/SQL ?

6 Answers  


Categories