CREATE TABLE Customers (customer_id INT, customer_details VARCHAR)
CREATE TABLE Residents (resident_id INT, property_id INT, date_moved_in DATETIME, date_moved_out DATETIME, other_details VARCHAR)
CREATE TABLE Things (thing_id INT, organization_id INT, Type_of_Thing_Code CHAR, service_type_code CHAR, service_details VARCHAR)
CREATE TABLE Residents_Services (resident_id INT, service_id INT, date_moved_in DATETIME, property_id INT, date_requested DATETIME, date_provided DATETIME, other_details VARCHAR)
CREATE TABLE Organizations (organization_id INT, parent_organization_id INT, organization_details VARCHAR)
CREATE TABLE Timed_Locations_of_Things (thing_id INT, Date_and_Time DATETIME, Location_Code CHAR)
CREATE TABLE Services (service_id INT, organization_id INT, service_type_code CHAR, service_details VARCHAR)
CREATE TABLE Properties (property_id INT, property_type_code CHAR, property_address VARCHAR, other_details VARCHAR)
CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID INT, Customer_Event_ID INT, service_type_code CHAR, resident_id INT, property_id INT, date_moved_in DATETIME)
CREATE TABLE Customer_Events (Customer_Event_ID INT, customer_id INT, date_moved_in DATETIME, property_id INT, resident_id INT, thing_id INT)
CREATE TABLE Timed_Status_of_Things (thing_id INT, Date_and_Date DATETIME, Status_of_Thing_Code CHAR)

A bar chart for what are the number of the distinct move in dates of the residents?, and sort by the total number in descending.
SELECT date_moved_in, COUNT(date_moved_in) FROM Residents ORDER BY COUNT(date_moved_in) DESC
SELECT "date_moved_in", COUNT("date_moved_in") FROM "Residents" ORDER BY COUNT("date_moved_in") DESC NULLS LAST