Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> CREATE TEMPORARY TABLE IF NOT EXISTS x_t AS
- -> SELECT
- -> t.*
- -> FROM
- -> `dfi_leads_log_cache` t
- -> WHERE t.WebsiteId IN ('962', '966', '1008', '1070')
- -> ORDER BY t.SentDate DESC
- -> LIMIT 10000;
- Query OK, 2953 rows affected, 1 warning (0.84 sec)
- Records: 2953 Duplicates: 0 Warnings: 1
- mysql> SELECT
- -> IFNULL(tt.`CustFullName`, "(Unknown)") AS `Name`,
- -> IF(tt.`LeadType` = 1, tt.Campaign, "") AS Campaign
- -> FROM
- -> x_t tt limit 10;
- +------------------+-----------+
- | Name | Campaign |
- +------------------+-----------+
- | Yiqzsgmw | NULL |
- | Marquita Davis | (not set) |
- | Bxjulmfd | NULL |
- | vincent bond | (not set) |
- | joe KONKOL | (not set) |
- | joe konkol | (not set) |
- | April Johnson | (not set) |
- | Jeffrey Bonamici | (not set) |
- | Cherl Nelson | NULL |
- | Cheryl Nelson | NULL |
- +------------------+-----------+
- 10 rows in set (0.00 sec)
- mysql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement