I have 2 tables in the same database.
I want to merge them based on the common
GROUP BY id
I am not sure What exactly do you want but anyway, this is your code
SELECT * FROM table1,table2 JOIN GROUP BY id
i just edit your query
SELECT * FROM table1 JOIN table2 on table2.id = table1.id GROUP BY table1.id // here you have to add table //on which you will be group by at this moment this is table1