Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

LeetCode SQL 50 #37

Answered by iamAntimPal
Antim-IWP asked this question in Q&A
Mar 21, 2025 · 2 comments · 1 reply
Discussion options

In that i have run time error tell me what is problem

1204. Last Person to Fit in the Bus

You must be logged in to vote

Thank you for your discussion and interest in contributing! This issue is marked as "Good First Issue," making it a great starting point for new contributors. We appreciate your help and look forward to your pull request. If you have any questions or need clarification, feel free to ask. Happy coding!

Replies: 2 comments · 1 reply

Comment options

Thank you for your discussion and interest in contributing! This issue is marked as "Good First Issue," making it a great starting point for new contributors. We appreciate your help and look forward to your pull request. If you have any questions or need clarification, feel free to ask. Happy coding!

You must be logged in to vote
1 reply
@IamShiwangi
Comment options

THANK YOU

Answer selected by Antim-IWP
Comment options

# Write your MySQL query statement below
SELECT a.person_name
FROM
    Queue AS a,
    Queue AS b
WHERE a.turn >= b.turn
GROUP BY a.person_id
HAVING SUM(b.weight) <= 1000
ORDER BY a.turn DESC
LIMIT 1;

EXPLANATION

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
good first issue Good for newcomers
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.