consider the following table:
two records: Id=2 and Id=3 satisfies the condition
@ohini why is the join done on email and not on id?
GROUP BY Email
No one has replied
your thinking is special.
This runs in 622ms
It may related to network. When I had ran the same code several times it returned me the different result of the time taken by program. Am I wrong?
I tried this way too. Mine was not accepted because I did not rename the new table in the (). (But it was accepted somewhere else...)
I don't think so, "DISTINCT" can ensure one Email will be shown only once.
COUNT takes column_name as parameter.
SELECT COUNT(ABC) FROM table_name returns the number of values in column ABC
This is correct solution
My first accepted like yours.
But this is much simple. Selecting from Person directly, rather a view.
The HAVING clause should always come with the GROUP BY clause, to make the semantics clear. Otherwise, the SQL interpreter would not know which attribute to aggregate.
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.