This document discusses data management and provides requests involving four tables: Customers, Accounts, Transactions, and constraints. The tables contain customer, account, and transaction information. The requests are: (1) find customer details that live in Irvine, have a balance below $10,000, and a transaction over $100; (2) find customer details without accounts ordered by zip code; (3) write a SQL assertion requiring customers with balances over $100,000 to have 2 or more accounts; (4) find accounts with two transactions on 01/01/2020.
This document discusses data management and provides requests involving four tables: Customers, Accounts, Transactions, and constraints. The tables contain customer, account, and transaction information. The requests are: (1) find customer details that live in Irvine, have a balance below $10,000, and a transaction over $100; (2) find customer details without accounts ordered by zip code; (3) write a SQL assertion requiring customers with balances over $100,000 to have 2 or more accounts; (4) find accounts with two transactions on 01/01/2020.
This document discusses data management and provides requests involving four tables: Customers, Accounts, Transactions, and constraints. The tables contain customer, account, and transaction information. The requests are: (1) find customer details that live in Irvine, have a balance below $10,000, and a transaction over $100; (2) find customer details without accounts ordered by zip code; (3) write a SQL assertion requiring customers with balances over $100,000 to have 2 or more accounts; (4) find accounts with two transactions on 01/01/2020.
Customers(CustomerID, Name, City, zipCode) Accounts(AccountID, CustomerID, Balance) ransactions(ransID, AccountID, Date, Amount) !ach relation has a candidate "ey including those underlined attri#utes(s). $rite SQL queries for following re%uests. a) &ind the CustomerID and name of each customer who li'es in Ir'ine, has a #alance at most ()****, and has a transaction with an amount at least (+**. #) &ind the name and zipCode of each customer who does not ha'e any account. ,a'e them listed #y zipCode from the highest to the lowest zipCode. c) $rite an -./ assertion to encode the constraint0 1If a customer has an account with a #alance greater than (+*,***, then the customer must ha'e A /!A- ) accounts.2 d) &ind the accountID of each account that has two different transactions on 3)43*4)**5.