I want to count landingpage views that happened 7 days before purchases. I used this query and its give an error
"cannot load from mysql.proc. the table is probably corrupted"
SELECT count(l.customer_id) FROM customer_profiles.purchase p
left join landingpage_view lp on lp.customer_id = p.customer_id
where lp.datetime between date_sub(p.datetime(), INTERVAL 7 Day) and p.datetime()
and lp.customer_id = '14475'