Count Male and Female Patients in a Single Row
Medium
2
69.8% Acceptance
Welcome to the SQL lab where you'll be working with the hospital.sqlite
database. Your challenge is to dive deep into real-world SQL problems and come up with solutions using the database tables provided.
- Table Used:
patients
Challenge:
Show the total amount of male patients and the total amount of female patients in the patients
table. Your goal is to display the two results in the same row.
Concepts:
- SELECT: The SELECT statement is used to select data from a database.
- COUNT: This SQL aggregate function retrieves the number of entries that match a specific condition.
- WHERE: Used in SQL to filter records based on specific conditions.
Good luck, and happy coding!