Which of the following queries returns the same output as th…
Which of the following queries returns the same output as the query below? SELECT c.customer_id, c.first_name , c.last_name , c.phoneFROM saletransactions AS sINNER JOIN customers AS c ON c.customer_id=s.customer_idINNER JOIN productsinfo AS p ON p.product_id=s.product_idWHERE p.product_type=’automobile’ AND c.phone IS NOT NULL ;
Read DetailsA retailer maintains a database with four tables: Customers,…
A retailer maintains a database with four tables: Customers, DealershipInfo, SalesTransactions, and ProductList. The Entity Relationship Model (ERM) below illustrates the primary and foreign key relationships among the four database tables. Each table is accompanied by a detailed schema that lists attribute names along with their corresponding data types. In the diagram, a gold key icon identifies the primary key of a table, while a silver key icon marks a foreign key, representing referential connections to related entities. Write a query to retrieve the sales_amount from transactions that occurred at dealerships located in Florida. Complete the query below: SELECT s.sales_amount, s.dealership_id, d.dealership_id , d.state FROM saletransactions AS sINNER JOIN ( SELECT __(1)___ FROM dealershipsinfo WHERE state=’FL’ ) AS dON __________(2)____________ ;
Read Details