Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Item Table Field Name Data Type Item_ID varchar Item_Name varchat date_of_receipt datetime Item_Stock int Purchase Table Field Name Data Type Buyer_ID varchar Item_ID varchar Purchase_Date
Item Table
Field Name | Data Type |
Item_ID | varchar |
Item_Name | varchat |
date_of_receipt | datetime |
Item_Stock | int |
Purchase Table
Field Name | Data Type |
Buyer_ID | varchar |
Item_ID | varchar |
Purchase_Date | datetime |
Purchase_Amount | int |
Buyer_Name | varchar |
1. Write a query to display Purchase_Date, Buyer_Name, and Purchase_Amount in the purchases table where Purchase_Amount = 2 and displays Purchase_Date, Buyer_Name, Purchase_Amount in the purchase table based on Buyer_Name containing the letter 'al'. (You can choose to use the Union query or Union All)
2. Write a query to display Item_ID, Item_Name, Purchase_Date, Buyer_Name, and Purchase_Amount where the purchase amount is the largest number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started