Question
Consider the following relations SalesPerson (SSN. Name, Start year. Dept no) Trip (SSN. From city. To city. Departure date, Return date, Trip-id) Expenses (Trip-id. Accounts,
Consider the following relations SalesPerson (SSN. Name, Start year. Dept no) Trip (SSN. From city. To city. Departure date, Return date, Trip-id) Expenses (Trip-id. Accounts, Amount Write SQL query to define the Trip relation, where Trip ID is the primary key, SSN is a foreign key to SSN in SalesPerson relation, departure date and Renum date both are dates attributes As we have a new salesperson with the following information, write SOL stement to add him to the database (SSN: 121212, Name: Amir, start-year: 2016, dept no: 10, Salary: 550) Write a query to retrieve the total amounts deduced from all accounts. For trip-id 123 List all names for salespersons who traveled from Amman? 5- Ust all salesperson SSN with their total number of trips for each salesperson
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started