Database schema:
CREATE TABLE Employee (
  EmployeeID NUMBER PRIMARY KEY,
  Name TEXT,
  Position TEXT,
  Salary NUMBER,
  Remarks TEXT
);
CREATE TABLE Planet (
  PlanetID NUMBER PRIMARY KEY,
  Name TEXT,
  Coordinates NUMBER
);
CREATE TABLE Shipment (
  ShipmentID NUMBER PRIMARY KEY,
  Date TIME,
  Manager NUMBER,
  Planet NUMBER,
  FOREIGN KEY (Planet) REFERENCES Planet(PlanetID),
  FOREIGN KEY (Manager) REFERENCES Employee(EmployeeID)
);
CREATE TABLE Has_Clearance (
  Employee NUMBER PRIMARY KEY,
  Planet NUMBER,
  Level NUMBER,
  FOREIGN KEY (Planet) REFERENCES Planet(PlanetID),
  FOREIGN KEY (Employee) REFERENCES Employee(EmployeeID)
);
CREATE TABLE Client (
  AccountNumber NUMBER PRIMARY KEY,
  Name TEXT
);
CREATE TABLE Package (
  Shipment NUMBER PRIMARY KEY,
  PackageNumber NUMBER,
  Contents TEXT,
  Weight NUMBER,
  Sender NUMBER,
  Recipient NUMBER,
  FOREIGN KEY (Recipient) REFERENCES Client(AccountNumber),
  FOREIGN KEY (Sender) REFERENCES Client(AccountNumber),
  FOREIGN KEY (Shipment) REFERENCES Shipment(ShipmentID)
);

Question: What are the dates of every shipment in the database?
SQL: SELECT Date FROM Shipment;

Question: What is the package number and weight of the heaviest package that was sent by a client named John or something similar?
SQL: SELECT T1.PackageNumber ,  max(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name LIKE "John";

Question: List all shipment ids for the planet Mars.
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID WHERE T2.Name  =  "Mars";

Question: What are the shipment ids for the planet Mars?
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID WHERE T2.Name  =  "Mars";

Question: List package number and weight of top 3 lightest packages.
SQL: SELECT PackageNumber ,  Weight FROM PACKAGE ORDER BY Weight ASC LIMIT 3;

Question: What are the names and coordinates of all planets in alphabetical order by name?
SQL: SELECT Name ,  Coordinates FROM Planet ORDER BY Name

Question: What are the number of shipments managed and names of each manager?
SQL: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID GROUP BY T1.Manager;

Question: How many shipments take place on each planet?
SQL: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet;

Question: List all shipment ids for the planet Mars and under the management of Turanga Leela.
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" AND T3.Name = "Turanga Leela";

Question: What are the Coordinates of planet Mars?
SQL: SELECT Coordinates FROM Planet WHERE Name  =  "Mars";

Question: List all package numbers received by Leo Wong ?
SQL: select t1.packagenumber from package as t1 join client as t2 on t1.recipient  =  t2.accountnumber where t2.name = "leo wong";

Question: What are the package contents of all those sent by John Zoidfarb?
SQL: SELECT T1.Contents FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "John Zoidfarb";

Question: What are the names of all employees who have a salary greater than average or more than 5000?
SQL: SELECT Name FROM Employee WHERE Salary  >  5000 OR Salary  >  (SELECT avg(salary) FROM employee)

Question: Which planet has most shipments? List the planet name.
SQL: SELECT T2.Name FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet ORDER BY count(*) DESC LIMIT 1;

Question: What is the heaviest package sent by the clients which 'John' is part of their name? List package number and weight.
SQL: SELECT T1.PackageNumber ,  max(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name LIKE "John";

Question: List the manger's name and number of shipments under his management.
SQL: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID GROUP BY T1.Manager;

Question: Which planet has total weight of shipment greater than 30? List planet name.
SQL: SELECT T3.Name FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID GROUP BY T2.Planet HAVING sum(T1.Weight)  >  30;

Question: What are the names of all employees with clearance on Omega III?
SQL: SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name  =  "Omega III";

Question: What is the name of all clients who sent more than one package?
SQL: SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender HAVING count(*)  >  1;

Question: List the dates of all shipments.
SQL: SELECT Date FROM Shipment;

Question: What is the salary and position of the employee named Turanga Leela?
SQL: SELECT Salary ,  POSITION FROM Employee WHERE Name  =  "Turanga Leela";

Question: What position does Amy Wong have?
SQL: SELECT POSITION FROM Employee WHERE Name  =  "Amy Wong";

Question: What are the names of all employees who don't have clearance on Mars?
SQL: SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = "Mars";

Question: What is the total weight of all the packages that customer Leo Wong sent?
SQL: SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";

Question: What is the average salary of an intern?
SQL: SELECT avg(Salary) FROM Employee WHERE POSITION  =  "Intern";

Question: What are the ids for all shipments on the planet Mars that Turanga Leela manages?
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" OR T3.Name = "Turanga Leela";

Question: What are the shipment IDs of every delivery managed by Phillip J Fry?
SQL: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID WHERE T2.Name = "Phillip J. Fry";

Question: List all package sent or received by Leo Wong.
SQL: SELECT DISTINCT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber OR T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"

Question: Calculate total weight of package shipped in each planet . show the name of each planet .
SQL: select t3.name ,  sum(t1.weight) from package as t1 join shipment as t2 on t1.shipment = t2.shipmentid join planet as t3 on t2.planet = t3.planetid group by t2.planet;

Question: What is the total weight for all packages that Leo Wong sent?
SQL: SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";

Question: Count the number of packages sent by Ogden Wernstrom and received by Leo Wong.
SQL: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name = "Ogden Wernstrom" INTERSECT SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"

Question: What are the contents of package sent by John Zoidfarb?
SQL: SELECT T1.Contents FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "John Zoidfarb";

Question: Find the name of employees whose salary is above the average salary or more than 5000.
SQL: SELECT Name FROM Employee WHERE Salary  >  5000 OR Salary  >  (SELECT avg(salary) FROM employee)