Answered step by step
Verified Expert Solution
Question
1 Approved Answer
pls solve all the questions using psql Consider the business trip database that keeps track of the business trips of salesman in an office. Following
pls solve all the questions using psql
Consider the business trip database that keeps track of the business trips of salesman in an office. Following are the tables: SALESMAN (SNO INTEGER, S_NAME CHAR (30), START_YEAR YEAR) TRIP (TNO INTEGER, FROM_CITY CHAR (20), TO_CITY CHAR(20), DEPARTURE_DATE DATE, RETURN DATE) DEPT (DEPTNO VARCHAR (10), DEPT_NAME CHAR(20)) EXPENSE (EID INTEGER, AMOUNT MONEY) The relationship is as follows DEPT-SALESMAN 1 TO M SALESMAN - TRIP 1 TO M TRIP - EXPENSE 1 TO 1 a) Write a function to display names of salesman from 'Home appliances' department. b) Write a PL/pgsql function to find a business trip having maximum expenses. c) Write a function to delete information of all trips to 'pune' city d) Write a function increase expense of all the trips by 50000 e) Write a function to update the departure date for given trip number (accept trip no and new departure date from user)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