CREATE TABLE flight (id INT, Vehicle_Flight_number TEXT, Date TEXT, Pilot TEXT, Velocity FLOAT, Altitude FLOAT, airport_id INT, company_id INT)
CREATE TABLE operate_company (id INT, name TEXT, Type TEXT, Principal_activities TEXT, Incorporated_in TEXT, Group_Equity_Shareholding FLOAT)
CREATE TABLE airport (id INT, City TEXT, Country TEXT, IATA TEXT, ICAO TEXT, name TEXT)

How many companies that have ever operated a flight for each type? Draw a bar chart, and display in desc by the total number.
SELECT Type, COUNT(Type) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY Type ORDER BY COUNT(Type) DESC
SELECT "Type", COUNT("Type") FROM "operate_company" AS "T1" JOIN "flight" AS "t2" ON "T1"."id" = "T2"."company_id" GROUP BY "Type" ORDER BY COUNT("Type") DESC NULLS LAST