Question: Question Database SQL As Subquery Sales 1 Computer Brand PK IDComputerBrand char(6) ComputerBrandName varchar(100) 1 Computer PK IDComputer char(6) FK IDComputerBrand char(6) ComputerBrand varchar(100) ComputerName


Question Database SQL As Subquery
Sales 1 Computer Brand PK IDComputerBrand char(6) ComputerBrandName varchar(100) 1 Computer PK IDComputer char(6) FK IDComputerBrand char(6) ComputerBrand varchar(100) ComputerName varchar(100) Computer Price int 1 Supplier PK Supplier char(6) FK IDComputer char(6) SupplierName varchar(100) SupplierContact Number varchar(20) Supplier Address varchar(100) 1- PK IDSales char(6) SalesName varchar(100) SalesDate of Birth date SalesGender varchar(100) Sales ContactNumber varchar(20) SalesAddress varchar(100) SalesSalary int 1 1 1 1 1.. 1- 1. PK JIDClient FK IDComputer ClientName ClientDate of Birth ClientGender ClientEmail ClientAddress Client char(6) char(6) varchar(100) date varchar(20) varchar(100) varchar(100) 1.. Sales Transaction PKIDSales Transaction char(6) FK IDSales char(6) FK IDClient char(6) TransactionDateSales date Computer Sold int QuantityOfSales int Buying Transaction PK IDBuying Transaction char(0) 6 FK IDSales char(6) FK Supplier char(6) Transaction DateBuying date Buying Computer int QuantityOfBuying int 1. The erd provides an explanation of sales transactions to clients and buying transactions from suppliers. Then there is a case below that must be solved with a sql query (Subquery). Show (use SELECT in SELECT and Join) ID ComputerBrand, ComputerBrand, IDClient, ClientEmail (get from replace format email to '@max.com'), Quantity (get from sum Quantity of computers of the Brand) for the highest Quantity of the brand, client that has the email format '@yahoo.com' and ID Client ending in odd number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
