Please provide SQL statement for the question below:
Configure who has been most frequently working as a banner? Please provide a name.
To note: Students can lease university flats and some of the details of lease held by students for places in university flats are shown in Figure 14.24. • Lease table use leaseNo as a primary key and bannerID and placeNo as foreign keys. • Flat table use flatNo as a primary key and stores addresses of flat – university apartment. • Banner table use bannerNo as a primary key and stores resident assistant student names. • Flat_room tables stores placeNo and flatNo. placeNo as a primary key and flatNo as foreign key.
Banner Table
create table banner (bannerID varchar(30) primary key, fName varchar(10), IName varchar(10) );
Flat table
create table flat (flatNo varchar(10) primary key, flat_Address varchar(30) );
Flat_room table
create table flat_room (placeNo int(10) primary key, flatNo varchar(10) references flat(flatNo));
Lease Table
create table lease (leaseNo int(10) primary key, bannerID varchar(10) references banner(bannerID), placeNo int(10) references flat_room (placeNo), startDate varchar(12),finishDate varchar(12));
===============================
Insert Values
Banner table
insert into banner (bannerID, fName,IName) values('B017706','Jane','Watt'), ('B013399', 'Tom', 'Jones'), ('B012124', 'Karen','Black'), ('B034511', 'Steeven','Smith');
Flat table
insert into flat(flatNo, flat_Address) values ('F56','34 High street paisley'), ('F78','111 Strrie Road, Paisley'), ('F79','120 Lady lane paisley');
Flat_room table
insert into flat_room (placeNo, flatNo) values (78,'F56'), (88,'F78'), (89,'F78'), (102,'F79');
Lease Table
insert into lease (leaseNo, bannerID, placeNo, startDate, finishDate) values (10003, 'B017706', 78,'1/09/2010' ,'30/06/2011'),(10259, 'B017706', 88,'1/09/2011' ,'30/06/2012'),(10364, 'B013399', 89,'1/09/2011' ,'30/06/2012'),(10566, 'B012124', 102,'1/09/2011' ,'30/06/2012'),(11067, 'B034511', 88,'1/09/2012' ,'30/06/2013'),(11169, 'B013399', 78,'1/09/2012' ,'30/06/2013');
Most freequently working as a banner
select fname,IName from banner where bannerID in (select bannerID from lease group by bannerID having count(bannerID)>1);
====================
Please provide SQL statement for the question below: Configure who has been most frequently working as...
DATABASE SYSTEMS Project INDIVIDUAL WORK DELIVERABLE #: SUBMISSION DATE No Group Work Allowed April 8 Introduction to Coursework You have been approached by a University for the design and implementation of a relational database system that will provide information on the courses it offers, the academic departments that run the courses, the academic staff and the enrolled students. The system will be used mainly by the students and the academic staff. The requirement collection and analysis phase of the database...
SQL Query Question: I have a database with the tables below, data has also been aded into these tables, I have 2 tasks: 1. Add a column to a relational table POSITIONS to store information about the total number of skills needed by each advertised position. A name of the column is up to you. Assume that no more than 9 skills are needed for each position. Next, use a single UPDATE statement to set the values in the new...