CREATE TABLE Purchases (purchase_transaction_id NUMBER, purchase_details VARCHAR2)
CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR2, transaction_type_description VARCHAR2)
CREATE TABLE Transactions (transaction_id NUMBER, investor_id NUMBER, transaction_type_code VARCHAR2, date_of_transaction DATETIME, amount_of_transaction NUMBER, share_count VARCHAR2, other_details VARCHAR2)
CREATE TABLE Lots (lot_id NUMBER, investor_id NUMBER, lot_details VARCHAR2)
CREATE TABLE Sales (sales_transaction_id NUMBER, sales_details VARCHAR2)
CREATE TABLE Investors (investor_id NUMBER, Investor_details VARCHAR2)
CREATE TABLE Transactions_Lots (transaction_id NUMBER, lot_id NUMBER)

A bar chart for what are the number of the purchase details of transactions with amount bigger than 10000?, and could you rank in asc by the the number of purchase details?
SELECT purchase_details, COUNT(purchase_details) FROM Purchases AS T1 JOIN Transactions AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 GROUP BY purchase_details ORDER BY COUNT(purchase_details)
SELECT "purchase_details", COUNT("purchase_details") FROM "Purchases" "T1" JOIN "Transactions" "T2" ON "T1"."purchase_transaction_id" = "T2"."transaction_id" AND "T2"."amount_of_transaction" > 10000 GROUP BY "purchase_details" ORDER BY COUNT("purchase_details")