Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

Describe the function of the HOQs roof.

Answered: 1 week ago