This sounds simple, and probably is but having a hard time figuring it out with an elegant solution… basically I’m looking to retrieve a single row based on the foreign key value.
So if we had a table that looks like the following:
id | description | fkid
1 | hello | 1
2 | world | 1
3 | foo | 2
4 | bar | 2
5 | this | 3
6 | that | 3
It would be good to have the query to return any one id (don’t mind which one) with a unique fk value, something like this:
id | description | fkid
1 | hello | 1
3 | foo | 2
5 | this | 3
Thanks in advance for any help!