CREATE TABLE Scientists (SSN INT, Name CHAR)
CREATE TABLE AssignedTo (Scientist INT, Project CHAR)
CREATE TABLE Projects (Code CHAR, Name CHAR, Hours INT)

What is the name of the project that has a scientist assigned to it whose name contains 'Smith', and count them by a bar chart, I want to order in asc by the total number.
SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name ORDER BY COUNT(T2.Name)
SELECT "T2"."Name", COUNT("T2"."Name") FROM "AssignedTo" AS "T1" JOIN "Projects" AS "T2" ON "T1"."Project" = "T2"."Code" JOIN "Scientists" AS "T3" ON "T1"."Scientist" = "T3"."SSN" AND "T3"."Name" LIKE '%Smith%' GROUP BY "T2"."Name" ORDER BY COUNT("T2"."Name") NULLS FIRST