Python Programming
Showing posts with label
select
.
Show all posts
Showing posts with label
select
.
Show all posts
Friday, November 27, 2015
SQL -- Aggregate Functions (AVG)
Select the average price of all of the items ordered that were purchased in the month of Dec.
SELECT AVG(price)
FROM items_ordered
WHERE order_date LIKE '%Dec%';
Thursday, October 15, 2015
SQL -- Selecting Distinct
The following example displays a listing of each of the unique (distinct) items from the items_ordered table.
Select the distinct items in the items_ordered table. In other words, display a listing of each of the unique items from the items_ordered table.
SELECT DISTINCT item
FROM items_ordered;
SQL -- Select Statement
1. Select the customerid, order_date, and item values from the items_ordered table for any items in the item column that start with the letter "S".
SELECT customerid, order_date, item, price
FROM items_ordered
WHERE item LIKE 'S%';
Sunday, September 13, 2015
SQL -- More Data Selection
Selecting data from employee table using the LIKE condition. Only first names that end in 'n' are selected.
select * from
myemployees_RDP0680
where firstname LIKE '%n'
Older Posts
Home
Subscribe to:
Posts (Atom)