create appropriate relational table with solution to the questions i give
- User
create appropriate relational table with solution to the questions i give
- Assistant
Of course! Please go ahead and provide the questions or the scenario you're thinking about, and I will help you design the appropriate relational tables along with solutions.
- User
Consider the following schema: Sailors (sid, sname, rating, age) Boats (bid, bname, color) Reserves (sid, bid, day(date)) Write subquery statement for the following queries.
- Find all information of sailors who have reserved boat number 101.
- Find the name of boat reserved by Bob.
- Find the names of sailors who have reserved a red boat, and list in the order of age.
- Find the names of sailors who have reserved at least one boat.
- Find the ids and names of sailors who have reserved two different boats on the same day.
- Find the ids of sailors who have reserved a red boat or a green boat.
- Find the name and the age of the youngest sailor.
- Count the number of different sailor names.
- Find the average age of sailors for each rating level.
- Find the average age of sailors for each rating level that has at least two sailors.
- Assistant
- User
insert data to tables and giv e answwer
- Assistant
- User
create table and insert data and then solve the questions
- Assistant
- User
- Create a table called EMP with the following structure. Name Type EMPNO NUMBER (6) ENAME VARCHAR2 (20) JOB VARCHAR2 (10) DEPTNO NUMBER (3) SAL NUMBER (7,2) Allow NULL for all columns except ename and job.
- Add constraints to check, while entering the empno value (i.e) empno > 100.
- Define the field DEPTNO as unique.
- Create a primary key constraint for the table (EMPNO).
- Write queries to implement and practice constraints.
- Assistant
- User
create table and insert values into tables and then solve the questions and show output.
- Assistant