Moderator: moderator
SELECT
customer_1_tbl.firstname,
customer_1_tbl.lastname,
customer_1_tbl.email,
rdir_log_tbl.change_date,
rdir_log_tbl.url_id,
rdir_url_tbl.full_url
FROM rdir_log_tbl
LEFT OUTER JOIN customer_1_tbl ON rdir_log_tbl.customer_id = customer_1_tbl.customer_id
LEFT OUTER JOIN rdir_url_tbl ON rdir_url_tbl.url_id = rdir_log_tbl.url_id
WHERE rdir_log_tbl.mailing_id = 'MAILING_ID'
ORDER BY rdir_log_tbl.change_date ASC;SELECT
customer_1_tbl.firstname,
customer_1_tbl.lastname,
customer_1_tbl.email,
onepixel_log_tbl.change_date
FROM onepixel_log_tbl
LEFT OUTER JOIN customer_1_tbl on onepixel_log_tbl.customer_id = customer_1_tbl.customer_id
WHERE onepixel_log_tbl.mailing_id = 'MAILING_ID'
ORDER BY onepixel_log_tbl.change_date ASC;ma wrote:Our commercial customers (marketing people) would be overwhelmed ...
select c.email, c.firstname, c.lastname, count(l.customer_id) from rdir_log_tbl l, customer_1_tbl c where l.customer_id = c.customer_id group by c.email order by count(l.customer_id) desc;
select c.email, c.firstname, c.lastname, count(l.customer_id) from rdir_log_tbl l, customer_1_tbl c where mailing_id='MAILING_ID' and l.customer_id = c.customer_id group by c.email order by count(l.customer_id) desc;
select c.email, c.firstname, c.lastname, l.open_count from onepixel_log_tbl l, customer_1_tbl c where mailing_id='MAILING_ID' and l.customer_id = c.customer_id group by c.email order by count(l.customer_id) desc;
select c.email, c.firstname, c.lastname, sum(l.open_count) from onepixel_log_tbl l, customer_1_tbl c where l.customer_id = c.customer_id group by c.email order by count(l.customer_id) desc;
Users browsing this forum: No registered users and 0 guests