Report only the
items for sale (Price_Sold is NULL).
SELECT item_id, description
FROM ( ITEM JOIN CONSIGNMENT_SELLER ON
Consignment_Seller_ID = Seller_ID)
WHERE name = 'Parker Smith' AND Price_Sold IS NULL;
In all of these examples, the specific syntax may vary by database product. Here is the proper
syntax for Microsoft Access:
SELECT item_id, description
FROM Item INNER JOIN CONSIGNMENT_SELLER ON
Item.Consignment_Seller_ID =
Consignment_Seller.Seller_ID
WHERE name = 'Parker Smith' AND Price_Sold IS NULL;
c Report the total of all sales during last March.
SELECT SUM (Line_Item_Price)
FROM (Sale JOIN Line_Item ON Invoice_No)
WHERE Date LIKE '%2007-03%';
In Access:
SELECT Sum (Line_item.line_item_price)
FROM Sale INNER JOIN Line_item
ON Sale.Invoice_no =
Line_item.Invoice_No
WHERE Sale.date Like "*3/*2007*";
d Find all the items on consignment from ???Parker Smith??? that sold this month.
SELECT item_id
FROM (Sale JOIN Line_Item ON Invoice_No)
WHERE Date LIKE '%2007-11%'
AND item_id IN
(SELECT item_id
FROM ( Item JOIN Consignment_seller ON
Consignment_Seller_ID = Seller_ID)
WHERE name = 'Parker Smith'
AND Price_Sold IS NOT NULL);
Seller_ID | Name | Addr | City | State | ZIP | Free_Precent
In Access:
SELECT item_id
FROM Sale INNER JOIN Line_Item ON
Sale.
Pages:
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539