if i have multiple distinct ids for different events, how do i look at which distinct id is linked with which event?
You can do this in a few different ways depending on where youβre querying the data.
1. In Mixpanel UI (Events)
The Events view shows a raw event stream. Each row is a single event, and you can see its distinct_id in the JSON payload:
Go to Data β Events.
Filter to the event(s) you care about.
Click an event row and toggle JSON mode to see all properties, including distinct_id for that event. [Debugging]
This lets you visually inspect βwhich distinct_id did this event use?β.
2. Via JQL (custom JS queries)
In JQL, each event object has a distinct_id and name (event name). [JQL events]
Example JQL to list event name + distinct_id pairs:
function main() {
return Events({
from_date: "2024-01-01",
to_date: "2024-01-07"
})
.map(function(e) {
return {
event: e.name,
distinct_id: e.distinct_id
};
});
}
You can add filters on e.name to focus on specific events.
3. In exported data (Snowflake / BigQuery / other SQL)
Exports put event_name (or mp_event_name) and distinct_id in columns, so you can query directly. [Snowflake queries; Common SQL]
Example (Snowflake, one master table):
SELECT
mp_event_name,
distinct_id,
COUNT(*) AS event_count
FROM mixpanel.mp_master_event
GROUP BY mp_event_name, distinct_id
ORDER BY mp_event_name, event_count DESC;
Example (BigQuery):
SELECT
event_name,
distinct_id,
COUNT(*) AS event_count
FROM `<your dataset>.mp_master_event`
GROUP BY event_name, distinct_id
ORDER BY event_name, event_count DESC;
These queries show which distinct_ids are associated with which events, and how often.
-------------------------
If you clarify whether youβre working in the UI, JQL, or a warehouse export, I can tailor the exact query/filter for your case.
βΉοΈΒ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
