I'm working with Oracle database and PHP, I need to return only one product each with the most recent change date, the tables are as follows.
product
price
Ihavetriedseveralquerytypes,butIalwaysgetduplicateresults.
Andtryingtogroupwiththefollowingquery
SELECTa.CODPROD,a.DESCRICAO,b.PVENDA,b.CODPRODFROMPCPRODUTa,PCPRECObGROUPBYb.CODPROD
Igetthefollowingerror:
"ORA-00979: not a GROUP BY expression"