Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- my1.data AS PAW_ID,
- abc.abc_medium AS abc_Medium,
- my.data AS Trial_Date,
- my2.data AS Upgrade_Date,
- my3.lastmod AS Cancel_Date
- 123 | email | 1-1-2014 | 2-1-2014 | 3-1-2014
- 123 | banner| 4-1-2014 | 2-1-2014 | 3-1-2014
- SELECT columnsIWant
- FROM tables
- JOIN otherTables ON conditions
- JOIN (SELECT paw_id, MIN(created) AS minDate
- FROM def208
- GROUP BY paw_id) tempTable
- ON tempTable.paw_id = realTable.paw_id AND tempTable.minDate = realTable.created;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement