select eid from(select count(*) cnt,eid from certified group by eid)as foo where cnt=(select max(cnt) from (select count(*) cnt,eid from certified group by eid)as goo);
This query displays the eid with maximum no of entries in the table certified. Which in this case is no. of aircraft licensed to an eid.
This query feels very processor heavy to me. How can i optimize it.
gauravk_bhanot
0
Newbie Poster
Recommended Answers
Jump to Postkindly post the underlying table structure and desired output for further analysis.
All 4 Replies
debasisdas
580
Posting Genius
Featured Poster
gauravk_bhanot
0
Newbie Poster
debasisdas
580
Posting Genius
Featured Poster
gauravk_bhanot
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.