Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Tags
#has-images
Question

B) Oracle GROUP BY with an aggregate function example

The following statement returns the number of orders by customers:

Answer

SELECT customer_id, COUNT ( order_id ) FROM orders GROUP BY customer_id ORDER BY customer_id;


Tags
#has-images
Question

B) Oracle GROUP BY with an aggregate function example

The following statement returns the number of orders by customers:

Answer
?

Tags
#has-images
Question

B) Oracle GROUP BY with an aggregate function example

The following statement returns the number of orders by customers:

Answer

SELECT customer_id, COUNT ( order_id ) FROM orders GROUP BY customer_id ORDER BY customer_id;

If you want to change selection, open document below and click on "Move attachment"

The Ultimate Guide to Oracle GROUP BY with Examples
1 2 3 4 5 6 SELECT status FROM orders GROUP BY status; This statement has the same effect as the following statement that uses the DISTINCT operator: 1 2 3 4 SELECT DISTINCT status FROM orders; <span>B) Oracle GROUP BY with an aggregate function example The following statement returns the number of orders by customers: 1 2 3 4 5 6 7 8 9 SELECT customer_id, COUNT( order_id ) FROM orders GROUP BY customer_id ORDER BY customer_id; In this example, we grouped the orders by customers and used the COUNT() function to return the number of orders per group. To get more meaningful data, you can join the orders table wi

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.