0% found this document useful (0 votes)
9 views3 pages

Practical No. 15 Ordering and Grouping Data

Uploaded by

mivavov105
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Practical No. 15 Ordering and Grouping Data

Uploaded by

mivavov105
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

select * from electronic_shop;

O_ID C_NAME O_NAME AMOUNT

---------- -------------------- -------------------- ----------

101 Parth Mouse 200

102 Nakul PD 250

103 Tanmay CPU 5000

104 Om Keyboard 300

105 Moniter Moniter 4500

SQL> SELECT o_id, C_Name, O_Name, Amount FROM electronic_shop ORDER BY Amount ASC;

O_ID C_NAME O_NAME AMOUNT

---------- -------------------- -------------------- ----------

101 Parth Mouse 200

102 Nakul PD 250

104 Om Keyboard 300

105 Moniter Moniter 4500

103 Tanmay CPU 5000

SQL> SELECT o_id, C_Name, O_Name, Amount FROM electronic_shop ORDER BY Amount DESC;

O_ID C_NAME O_NAME AMOUNT

---------- -------------------- -------------------- ----------

103 Tanmay CPU 5000


105 Moniter Moniter 4500

104 Om Keyboard 300

102 Nakul PD 250

101 Parth Mouse 200

SQL> select * from data;

NAME COUNTRY

-------------------- --------------------

Parth India

Nakul Nigeria

Om India

Tanmay India

Piyush Nigeria

Aditya Nigeria

Rahul India

7 rows selected.

SQL> SELECT country

2 FROM data

3 GROUP BY country;

COUNTRY

--------------------
India

Nigeria

You might also like