CREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id INT, catalog_level_number INT, attribute_id INT, attribute_value VARCHAR)
CREATE TABLE Catalog_Contents (catalog_entry_id INT, catalog_level_number INT, parent_entry_id INT, previous_entry_id INT, next_entry_id INT, catalog_entry_name VARCHAR, product_stock_number VARCHAR, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity VARCHAR, length VARCHAR, height VARCHAR, width VARCHAR)
CREATE TABLE Attribute_Definitions (attribute_id INT, attribute_name VARCHAR, attribute_data_type VARCHAR)
CREATE TABLE Catalog_Structure (catalog_level_number INT, catalog_id INT, catalog_level_name VARCHAR)
CREATE TABLE Catalogs (catalog_id INT, catalog_name VARCHAR, catalog_publisher VARCHAR, date_of_publication DATETIME, date_of_latest_revision DATETIME)

What are the names of catalog entries with level number 8, and count them by a bar chart, and rank Y in asc order.
SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY COUNT(catalog_entry_name)
SELECT "catalog_entry_name", COUNT("catalog_entry_name") FROM "Catalog_Contents" AS "t1" JOIN "Catalog_Contents_Additional_Attributes" AS "t2" ON "8" = "t2"."catalog_level_number" AND "t1"."catalog_entry_id" = "t2"."catalog_entry_id" GROUP BY "catalog_entry_name" ORDER BY COUNT("catalog_entry_name") NULLS FIRST