Write a SQL query to join web traffic data from a marketing site with lead generation data stored in a CRM database. Return one row for each non-null visitor email found in the web traffic data, including visitors without leads.
visitor_email, session_count, total_pageviews, lead_count, converted_lead_count, and first_lead_datesession_count descending, then visitor_email ascending| Column | Type | Description |
|---|---|---|
| traffic_idPK | INT | Unique traffic session record |
| visitor_email | VARCHAR(255) | Email identifying the website visitor |
| visit_date | DATE | Date of the website visit |
| landing_page | VARCHAR(100) | Marketing page where the visit began |
| pageviews | INT | Number of pages viewed during the session |
| Column | Type | Description |
|---|---|---|
| lead_idPK | INT | Unique CRM lead record |
| visitor_email | VARCHAR(255) | Email associated with the lead |
| lead_date | DATE | Date the lead was created |
| lead_status | VARCHAR(30) | Current CRM status of the lead |