Question: Given the Schema shown below: Write the query using both relational algebra and SQL that show the Total trip expenses for a salesman named john
Given the Schema shown below: Write the query using both relational algebra and SQL that show the Total trip expenses for a salesman named john smith" and explain how the queries work step by step
Table 1: Schema
| Entities | Attributes |
| Salesperson | ssn#(pk), s_name, start_year, dept_name |
| Trip | tripid# (pk), ssn#(fk), from_city, to_city, depart_date, return_date |
| Expense | tripid# (fk), account# (fk), amount |
| Account | account#(pk), account_name, chart |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
