CREATE TABLE Courses (course_id INT, author_id INT, subject_id INT, course_name VARCHAR, course_description VARCHAR)
CREATE TABLE Subjects (subject_id INT, subject_name VARCHAR)
CREATE TABLE Student_Course_Enrolment (registration_id INT, student_id INT, course_id INT, date_of_enrolment DATETIME, date_of_completion DATETIME)
CREATE TABLE Students (student_id INT, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR, password VARCHAR, personal_name VARCHAR, middle_name VARCHAR, family_name VARCHAR)
CREATE TABLE Student_Tests_Taken (registration_id INT, date_test_taken DATETIME, test_result VARCHAR)
CREATE TABLE Course_Authors_and_Tutors (author_id INT, author_tutor_ATB VARCHAR, login_name VARCHAR, password VARCHAR, personal_name VARCHAR, middle_name VARCHAR, family_name VARCHAR, gender_mf VARCHAR, address_line_1 VARCHAR)

A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, could you order from low to high by the names?
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY date_of_completion
SELECT "date_of_completion", COUNT("date_of_completion") FROM "Student_Course_Enrolment" AS "T1" JOIN "Student_Tests_Taken" AS "T2" ON "Fail" = "T2"."test_result" AND "T1"."registration_id" = "T2"."registration_id" GROUP BY "date_of_completion" ORDER BY "date_of_completion" NULLS FIRST