Select the ID from Railways where the minimum ID is 10. Minimum ID out
of which IDs? Either group records to have several IDs to choose from or
remove Min.
You probably want all the ids that are greater than 10?
If so, try
SELECT id
FROM railways
WHERE id >= 10
MIN is a function that requires you to GROUP your records (like SUM or AVG
or COUNT). For example, if you wanted to count how many records existed for
each "id", then:
SELECT id, COUNT(*) AS COUNTER
FROM railways
GROUP BY id
ORDER BY id
Select the ID from Railways where the minimum ID is 10. Minimum ID out
of which IDs? Either group records to have several IDs to choose from or
remove Min.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.