I\'m having a problem in MySQL query.
I need MySQL query to display the following output and I also need to take CSV or Excel or PDF report.
In SQL, it's better to store a single value in a column, not a comma-separated list of values. See my answer to Is storing a comma separated list in a database column really that bad?
You can try this query, but it will be terribly slow and inefficient:
SELECT Table1.id, GROUP_CONCAT(Table2.values) AS values
FROM Table1
JOIN Table2 ON FIND_IN_SET(Table2.id, Table1.nos)
GROUP BY Table1.id;
See the FIND_IN_SET() function.