Page 98 - Computer Software Application TP - Volume 1
P. 98
COMPUTER SOFTWARE APPLICATION - CITS
4 Select with multiple conditions:
SELECT * FROM your table name WHERE condition1 AND condition2;
5 Select with ordering(ORDER BY clause):
SELECT * FROM your table name ORDER BY your column name DESC;
6 Select with a limit:
SELECT * FROM your table name LIMIT 10;
7 Select with a join:
SELECT t1.column1, t2.column2
FROM table1 t1
JOIN table2 t2 ON t1.common column = t2.common column;
8 Select with Aggregate functions (e.g. SUM, AVG):
SELECT AVG(your column name) AS average value
FROM your table name;
SELECT MIN(your column name) AS minimum value
FROM your table name;
1 How to retrieve maximum and minimum values in any particular column?
2 How to retrieve rows based on date range?
3 How to retrieve unique values in any column?
83
CITS : IT & ITES - Computer Software Application - Exercise 26