Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Patients With Repeat Visits

Return the patient_id and number of visits for every patient who visited more than once, ordered by patient_id.

Table schema

Visits(id INT PRIMARY KEY, patient_id INT, visit_date DATE)

Sample data

id | patient_id | visit_date
1 | 101 | 2026-01-03
2 | 102 | 2026-01-04
3 | 101 | 2026-02-10
4 | 103 | 2026-02-11
5 | 101 | 2026-03-01
6 | 102 | 2026-03-05

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.