CREATE TABLE Stay (StayID INT, Patient INT, Room INT, StayStart DATETIME, StayEnd DATETIME)
CREATE TABLE Physician (EmployeeID INT, Name VARCHAR, Position VARCHAR, SSN INT)
CREATE TABLE Room (RoomNumber INT, RoomType VARCHAR, BlockFloor INT, BlockCode INT, Unavailable BOOLEAN)
CREATE TABLE Appointment (AppointmentID INT, Patient INT, PrepNurse INT, Physician INT, Start DATETIME, End DATETIME, ExaminationRoom TEXT)
CREATE TABLE Nurse (EmployeeID INT, Name VARCHAR, Position VARCHAR, Registered BOOLEAN, SSN INT)
CREATE TABLE Department (DepartmentID INT, Name VARCHAR, Head INT)
CREATE TABLE Medication (Code INT, Name VARCHAR, Brand VARCHAR, Description VARCHAR)
CREATE TABLE Affiliated_With (Physician INT, Department INT, PrimaryAffiliation BOOLEAN)
CREATE TABLE Undergoes (Patient INT, Procedures INT, Stay INT, DateUndergoes DATETIME, Physician INT, AssistingNurse INT)
CREATE TABLE Patient (SSN INT, Name VARCHAR, Address VARCHAR, Phone VARCHAR, InsuranceID INT, PCP INT)
CREATE TABLE Prescribes (Physician INT, Patient INT, Medication INT, Date DATETIME, Appointment INT, Dose VARCHAR)
CREATE TABLE Trained_In (Physician INT, Treatment INT, CertificationDate DATETIME, CertificationExpires DATETIME)
CREATE TABLE Procedures (Code INT, Name VARCHAR, Cost FLOAT)
CREATE TABLE On_Call (Nurse INT, BlockFloor INT, BlockCode INT, OnCallStart DATETIME, OnCallEnd DATETIME)
CREATE TABLE Block (BlockFloor INT, BlockCode INT)

Display a bar chart for how many medications are prescribed for each brand?, and I want to display in desc by the x axis.
SELECT Name, COUNT(*) FROM Medication AS T1 JOIN Prescribes AS T2 ON T1.Code = T2.Medication GROUP BY T1.Brand ORDER BY Name DESC
SELECT "Name", COUNT(*) FROM "Medication" AS "T1" JOIN "Prescribes" AS "T2" ON "T1"."Code" = "T2"."Medication" GROUP BY "T1"."Brand" ORDER BY "Name" DESC NULLS LAST