Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
SQL Query for Female Patients
00:00
5 left

SQL Query for Female Patients

EasySQL · PostgreSQL

Problem

Select the number of female patients from the database.

The patients table contains one row per patient. Count only records whose gender is exactly Female, excluding other and missing gender values.

Output

  1. Return one row with a column named female_patient_count.
  2. The value must be the total number of female patients.

Schema

patients
ColumnTypeDescription
patient_idPKINTUnique patient identifier
patient_nameVARCHAR(100)Patient's full name
genderVARCHAR(20)Recorded patient gender
Tablespatients
Interviewer

Your question is SQL Query for Female Patients. Start with the requirements and the one table in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.