Using SQL and the following info Question 3: Find the people who do not have Viper Certificationbut

STUCK with your assignment? When is it due? Hire our professional essay experts who are available online 24/7 for an essay paper written to a high standard at a reasonable price.


Order a Similar Paper Order a Different Paper

Using SQL and the following info Question 3: Find the people who do not have Viper Certificationbut are still assigned to Viper class ship Find the
fname, lname, and ship_instance_id for allpeople who do not have Viper certification but are assigned to atleast one instance of a Viper class ship (this includes all
variants of Viper class ships). Return a row for every ship/person combination. Order yourresults by
fname in ascending order. Use the BSG database from the Quiz Description. I have gotten this far but all of the output isn’t correct.thank you for the help! select fname,lname from bsg_people p,bsg_ship_assignment a,bsg_ship_instance i,bsg_ship_class c where p.id=a.pid and a.sid=i.id and i.class=c.id and c.name=’Viper’ group by a.pid;CREATE TABLE `bsg_cert` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDBCREATE TABLE `bsg_cert_people` ( `cid` int(11) NOT NULL DEFAULT ‘0’, `pid` int(11) NOT NULL DEFAULT ‘0’, PRIMARY KEY (`cid`,`pid`), KEY `pid` (`pid`), CONSTRAINT `bsg_cert_people_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `bsg_cert` (`id`), CONSTRAINT `bsg_cert_people_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `bsg_people` (`id`)) ENGINE=InnoDBCREATE TABLE `bsg_people` ( `id` int(11) NOT NULL AUTO_INCREMENT, `fname` varchar(255) NOT NULL, `lname` varchar(255) DEFAULT NULL, `homeworld` int(11) DEFAULT NULL, `age` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `homeworld` (`homeworld`), CONSTRAINT `bsg_people_ibfk_1` FOREIGN KEY (`homeworld`) REFERENCES `bsg_planets` (`id`) ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=InnoDBCREATE TABLE `bsg_planets` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `population` bigint(20) DEFAULT NULL, `language` varchar(255) DEFAULT NULL, `capital` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`)) ENGINE=InnoDB . . .

Writerbay.net

Everyone needs a little help with academic work from time to time. Hire the best essay writing professionals working for us today!

Get a 15% discount for your first order


Order a Similar Paper Order a Different Paper