Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:46:48+00:00 2026-06-14T05:46:48+00:00

The script for mysql database is as follow: Create Table Aircraft ( aid integer

  • 0

The script for mysql database is as follow:

Create Table Aircraft
(
    aid integer not null,
    aname nchar(30) not null,
    cruisingrange integer not null,
    primary key (aid)   
);


Create Table Flights
(
    flNo integer not null,
    flFrom nchar(20)not null,
    flTo nchar(20) not null,
    distance integer not null,
    departs time not null,
    arrives time not null,
    price Decimal(6,2) not null,
    primary key(flNo)
);


create table Pilots
(
    pid integer not null,
    pname nchar(20) not null,
    salary Decimal(6,2) not null,
    primary key(pid)
);


create table certified
(
    pid integer not null,
    aid integer not null,
    primary key(pid,aid),
    foreign key(pid) references Pilots(pid)  ON DELETE CASCADE,
    foreign key(aid) references Aircraft(aid) ON DELETE CASCADE
);


INSERT INTO Aircraft(aid,aname,cruisingrange)
VALUES
(1, 'B-450',10000),
(2, 'C-190',4000),
(3, 'RN-110',5000),
(4, 'kp-30',2000),
(5, 'sh-60',1500),
(6, 'mr-70',7000),
(7, 'VK-20',3500);


INSERT INTO Flights(flNo,flFrom,flTo,distance,departs,arrives,price)
VALUES
(100,'city1','city2',1200,'16:00:00','16:30:00',130),
(110,'city3','city4',1000,'18:00:00','19:00:00',160),
(112,'city5','city6',2000,'15:00:00','16:00:00',185),
(115,'city7','city8',4000,'14:00:00','16:00:00',250),
(118,'city9','city3',1500,'18:00:00','19:00:00',220),
(119,'city2','city3',2500,'20:00:00','21:30:00',180);


INSERT INTO Pilots(pid,pname,salary)
VALUES
(400,'jack',150),
(410,'pit',180),
(420,'nami',200),
(430,'rafel',110),
(440,'linda',300);


INSERT INTO Certified(pid,aid)
VALUES 
(400,1),
(400,6),
(410,1),
(420,1),
(420,3),
(420,7),
(440,4),
(440,6);

I want a query to find the name of Aircrafts that ALL of Pilots certified for them have a salary more than 187$. In fact, that “ALL” is my problem! could anyone please help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:46:49+00:00Added an answer on June 14, 2026 at 5:46 am

    You could rephrase the problem as finding the planes whose certified pilots’ minimum salary is at least $187.

    This is simple to convert to SQL:

    SELECT aid
    FROM ... all your joins here ...
    GROUP BY aid
    HAVING MIN(salary) >= 187
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to extract a script from an MySQL database to create a
I am using MySQL Workbench to create a database. I have a table called
I'm writing a php script to export MySQL database rows into a .txt file
If a MySQL database connection is already open from a script (say PHP ),
I have a script that automatically populates a mysql database with data every hour.
I inserted data in a MySQL database which includes Arabic script. While the output
I have a Python script that queries a MySQL database every 5 seconds, gathering
I am inputting data into a mySQL database via a PHP script, but for
I created a script on a windows platform which connects to the mysql database
I'm writing a perl script that will access a MySQL database to determine whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.