I have 3 tables and I only need to compare data between 2 of them but only taking in mind the latest row. The structure of the table is as follows
|1||Place A||000000||[email protected]|
|2||Place B||000000||[email protected]|
|3||Place C||000000||[email protected]|
|234||Offer A for Place B||00000000||$1000|
|235||Offer B for Place B||00000000||$900|
|236||Offer C for Place B||00000000||$950|
|237||Offer A for Place C||00000000||$500|
Basically I wish to craft a query where I could take all the places data (places.*) joined with the latest offer (offer.*) data in 1 row.
When I join regularly I get a lot of duplicate rows. If I use GROUP BY statement I am not guaranteed to join the latest offer data from the offers table. Pivot tables confuse me.