CREATE TABLE Attribute_Definitions (
    attribute_id NUMBER PRIMARY KEY,
    attribute_name TEXT,
    attribute_data_type TEXT
);
CREATE TABLE Catalogs (
    catalog_id NUMBER PRIMARY KEY,
    catalog_name TEXT,
    catalog_publisher TEXT,
    date_of_publication TIME,
    date_of_latest_revision TIME
);
CREATE TABLE Catalog_Structure (
    catalog_level_number NUMBER PRIMARY KEY,
    catalog_id NUMBER,
    catalog_level_name TEXT,
    FOREIGN KEY ("catalog_id") REFERENCES Catalogs("catalog_id")
);
CREATE TABLE Catalog_Contents (
    catalog_entry_id NUMBER PRIMARY KEY,
    catalog_level_number NUMBER,
    parent_entry_id NUMBER,
    previous_entry_id NUMBER,
    next_entry_id NUMBER,
    catalog_entry_name TEXT,
    product_stock_number TEXT,
    price_in_dollars NUMBER,
    price_in_euros NUMBER,
    price_in_pounds NUMBER,
    capacity TEXT,
    length TEXT,
    height TEXT,
    width TEXT,
    FOREIGN KEY ("catalog_level_number") REFERENCES Catalog_Structure("catalog_level_number")
);
CREATE TABLE Catalog_Contents_Additional_Attributes (
    catalog_entry_id NUMBER,
    catalog_level_number NUMBER,
    attribute_id NUMBER,
    attribute_value TEXT,
    FOREIGN KEY ("catalog_level_number") REFERENCES Catalog_Structure("catalog_level_number"),
    FOREIGN KEY ("catalog_entry_id") REFERENCES Catalog_Contents("catalog_entry_id")
);

Question: Find the name and attribute ID of the attribute definitions with attribute value 0.
SQL: SELECT t1.attribute_name ,  t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id  =  t2.attribute_id WHERE t2.attribute_value  =  0

Question: Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.
SQL: SELECT t1.attribute_name ,  t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id  =  t2.attribute_id WHERE t2.attribute_value  =  0

Question: Find the name and capacity of products with price greater than 700 (in USD).
SQL: SELECT catalog_entry_name ,  capacity FROM Catalog_Contents WHERE price_in_dollars  >  700

Question: Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.
SQL: SELECT catalog_entry_name ,  capacity FROM Catalog_Contents WHERE price_in_dollars  >  700

Question: Find the dates on which more than one revisions were made.
SQL: SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*)  >  1

Question: On which days more than one revisions were made on catalogs.
SQL: SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*)  >  1

Question: How many products are there in the records?
SQL: SELECT count(*) FROM catalog_contents

Question: Find the total number of catalog contents.
SQL: SELECT count(*) FROM catalog_contents

Question: Name all the products with next entry ID greater than 8.
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id  >  8

Question: What are the catalog entry names of the products with next entry ID above 8?
SQL: SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id  >  8