A
A
Alexey FRZ2018-09-12 15:36:25
SQL
Alexey FRZ, 2018-09-12 15:36:25

How to write a SQL query to select from two tables by condition?

Query logic: display the last name of the patient with the maximum number of entries in the Treatments table in the current year. MS Access Runtime
5b99083ab9e6b415293369.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan., 2018-09-12
@leshqow

You can try this:
SELECT Person code
FROM
GROUP BY calls Person code
HAVING COUNT(1) >= ALL(SELECT COUNT(1)
FROM
GROUP BY calls Person code)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question