go.unc.edu/lbjones | Sample Queries: 01 | 03 | 04 | 06 | 07 | 09 | 11

Order Table Formatted

Inner Join Example

SQL INNER JOIN Keyword

SELECT tblOrder_ID, tblBook_Title, tblOrder_NumberOfBooksOrdered, 
tblOrder_DateOfOrder, tblOrder_DateOfOrderReceived, tblOrder_DiscountPrice
FROM tblBook
INNER JOIN tblOrder ON tblBook_ID = tblOrder_tblBook_ID
Order ID Title Number Ordered Date Ordered Date Received Discount Price
1 Great New York Conspiracy of 1741: Slavery, Crime, and Colonial Law 50 2019-11-07 2019-11-14 $ 16.00
2 Arming America 30 2019-11-07 2019-11-14 $ 21.00
3 Preface to Mark: Notes on the Gospel in its Literary and Cultural Settings 35 2019-11-07 2019-11-14 $ 8.00
4 Satan und das Dolce Vita 70 2019-11-08 2019-11-14 $ 27.00
5 Art of War: War and Military Thought 90 2019-11-08 2019-11-14 $ 23.00
6 Strategy; its theory and application: the wars for German unification, 1866-1871 32 2019-11-09 $ 19.00
7 Collapse at Meuse-Argonne: The Failure of the Missouri-Kansas Division 21 2019-11-09 $ 6.00
8 Die vergifteten Pralinen 70 2019-11-10 $ 31.00
9 American Dynasty: Aristocracy, Fortune, and the Politics of Deceit in the House of Bush 20 2019-11-10 $ 12.00
10 Origins of Christian Morality: The First Two Centuries 20 2019-11-10 $ 25.00

The tblOrder does not show the Book titles; it only contains the foreign key IDs of the tblBook primary key IDs:

Order Table Screenshot
Book ID of 200