Database schema:
CREATE TABLE headphone (
  Headphone_ID NUMBER PRIMARY KEY,
  Model TEXT,
  Class TEXT,
  Driver-matched_dB NUMBER,
  Construction TEXT,
  Earpads TEXT,
  Price NUMBER
);
CREATE TABLE store (
  Store_ID NUMBER PRIMARY KEY,
  Name TEXT,
  Neighborhood TEXT,
  Parking TEXT,
  Date_Opened TEXT
);
CREATE TABLE stock (
  Store_ID NUMBER PRIMARY KEY,
  Headphone_ID NUMBER,
  Quantity NUMBER,
  FOREIGN KEY (Headphone_ID) REFERENCES headphone(Headphone_ID),
  FOREIGN KEY (Store_ID) REFERENCES store(Store_ID)
);

Question: Which neighborhood does not have any headphone in stock?
SQL: SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id

Question: What are the top 2 earpads in terms of the number of headphones using them?
SQL: SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2

Question: Find the name of stores which have no headphone in stock.
SQL: SELECT name FROM store WHERE store_id NOT IN (SELECT store_id FROM stock)

Question: Find the average price for each headphone construction.
SQL: SELECT construction ,  avg(price) FROM headphone GROUP BY construction

Question: List name and parking info for the stores in the Tarzana neighborhood.
SQL: SELECT name ,  parking FROM store WHERE neighborhood  =  'Tarzana'

Question: Find the headphone class that does not contain more than two headphones.
SQL: SELECT CLASS FROM headphone GROUP BY CLASS HAVING count(*)  >  2

Question: Find the name of the store which has the most headphones in stock. List the number of headphones as well.
SQL: SELECT t1.name ,  sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1

Question: Which headphone class contains the most headphones?
SQL: SELECT CLASS FROM headphone GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1

Question: Count the number of distinct neighborhoods stores are located.
SQL: SELECT count(DISTINCT neighborhood) FROM store

Question: How many different neighborhoods are there for all stores?
SQL: SELECT count(DISTINCT neighborhood) FROM store

Question: Sort all store names by store open date.
SQL: SELECT name FROM store ORDER BY date_opened

Question: Find the number of headphones with a price higher than 200 for each class.
SQL: SELECT count(*) ,  CLASS FROM headphone WHERE price  >  200 GROUP BY CLASS

Question: Find the model, class, and construction of the headphone with the lowest price.
SQL: SELECT model ,  CLASS ,  construction FROM headphone ORDER BY price LIMIT 1

Question: Which headphone class is the most common one?
SQL: SELECT CLASS FROM headphone GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1

Question: Which headphone model has the largest quantity of stock across all the stores?
SQL: SELECT t1.model FROM headphone AS t1 JOIN stock AS t2 ON t1.headphone_id  =  t2.headphone_id GROUP BY t1.model ORDER BY sum(t2.quantity) DESC LIMIT 1

Question: how many different earpads are there?
SQL: SELECT count(DISTINCT earpads) FROM headphone

Question: List all different headphone models in the alphabetical order.
SQL: SELECT DISTINCT model FROM headphone ORDER BY model

Question: Which store has the headphones in stock? Give me the store name and the total quantity.
SQL: SELECT t1.name ,  sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1

Question: Find the total quantity of headphones stored in the Woodman store.
SQL: SELECT sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id WHERE t1.name  =  'Woodman'

Question: What are the model, class, and construction of the cheapest headphone?
SQL: SELECT model ,  CLASS ,  construction FROM headphone ORDER BY price LIMIT 1

Question: find the number of stores in each neighborhood.
SQL: SELECT count(*) ,  neighborhood FROM store GROUP BY neighborhood

Question: Which headphone model has the highest price?
SQL: SELECT model FROM headphone ORDER BY price DESC LIMIT 1

Question: Find the neighborhood where no headphones are in stock.
SQL: SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id

Question: What are the headphone models that cost less than the average price?
SQL: SELECT model FROM headphone WHERE price  <  (SELECT avg(price) FROM headphone)

Question: Return the list of distinct headphone models ordered alphabetically.
SQL: SELECT DISTINCT model FROM headphone ORDER BY model

Question: How much does headphones cost on average for each headphone construction?
SQL: SELECT construction ,  avg(price) FROM headphone GROUP BY construction

Question: Find the model of the most expensive headphone.
SQL: SELECT model FROM headphone ORDER BY price DESC LIMIT 1

Question: Find the top 2 earpads that are mostly used.
SQL: SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2

Question: How many headphones cost more than 200 for each headphone class?
SQL: SELECT count(*) ,  CLASS FROM headphone WHERE price  >  200 GROUP BY CLASS

Question: How many headphones are stored in the Woodman store?
SQL: SELECT sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id WHERE t1.name  =  'Woodman'

Question: How many stores are there in each neighborhood?
SQL: SELECT count(*) ,  neighborhood FROM store GROUP BY neighborhood

Question: Find the headphone models that are not in stock in any store.
SQL: SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)

Question: Which headphone class does have more than two headphones?
SQL: SELECT CLASS FROM headphone GROUP BY CLASS HAVING count(*)  >  2