Can u correct this query? it is show some syntax error.
SELECT *
WHERE `id` IN (SELECT DISTINCT unit_trust_managing_company_id
FROM ut_funds
ORDER BY `company_name`)
There SELECT DISTINCT unit_trust_managing_company_id FROM ut_funds ORDER BY
company_name` query is working properly.
You need a from
clause before the where
:
SELECT *
FROM <some table here>
WHERE `id` IN (SELECT unit_trust_managing_company_id FROM ut_funds)
Also, the distinct
and order by
are not needed for the in
statement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With