Here is the correct logic for calculating the Google Analytics 4 ‘Landing Page’ dimension in BigQuery, which also takes (not set) landing pages into account:

A landing page is identified by the ‘entrances’ event parameter, which is set to 1 for the first ‘page_view’ event of a session.

For subsequent visits to the same page in the same session, the ‘entrances’ parameter does not appear in the ‘event_params’ array.
The landing page is tied to a unique session and a session is identified by a unique combination of ‘user_pseudo_id’ and ‘session_id’.
Therefore, the landing page is unique for each unique combination of ‘user_pseudo_id’ and ‘session_id’.
Even if a user visits the same page multiple times in the same session, it will count as the landing page for the session only once.
Note: You may sometimes see rows where entrances = 1 for ‘page_location’ where both ‘user_pseudo_id’ and ‘session_id’ are null.

This could be due to bot traffic, consent mode or some data collection issue. You can ignore such rows if there are not many of them.
If the same user starts a new session (with a new ‘ga_session_id’), the landing page is calculated separately for that session.
Here is my definition of (not set) landing pages:
“If the value of a ‘page_location’ event parameter is ‘null’ or an empty string (“) and the value of ‘entrances’ event parameter is 1 or null then display ‘page_location’ as (not set) landing page.”
It is possible that for (not set) landing pages, entrances = null. This situation can occur when the ‘entrances’ event parameter is missing or not explicitly set for a ‘page_view’ event.
Related Article: ‘(not set)’ Landing Pages Show 0 Entrances in GA4 BigQuery.
Then how do we know whether the (not set) pages have the landing pages status?
In short, we can’t.
If the ‘entrances’ event parameter is missing or null, it is possible that the event is not a landing page but just a regular ‘page_view’ event within the session.
We can categorize (not set) pages into two groups:
1) Pages that are confirmed as landing pages (entrances = 1).
2) Pages for which landing page status is ambiguous because the ‘entrances’ event parameter is either null or missing.
There is also a strong possibility that GA4 UI includes all pageviews to (not set) pages as landing pages, regardless of whether the ‘entrances’ parameter is explicitly set to 1.
In contrast, the BigQuery export is more granular and treats only events with entrances = 1 as landing pages. When ‘entrances’ is null, these are not considered landing pages by default.
It’s better to exclude (not set) pages from landing page analysis or perform calculations on them separately, especially when (not set) is more of a “data headache” rather than a meaningful entry.
I included (not set) landing pages just to compare them with the corresponding landing pages report in GA4 UI.
Once you understand the logic, you can use the Landing Page dimension in any report you create in BigQuery.
I teach you such logic in my GA4 BigQuery course, where you can learn to automate SQL generation via text prompts in ChatGPT.

There could be ‘N’ use cases, and it won’t be possible to provide ready-made SQL code for every possible case.
So, it is better that you understand the logic to scale SQL generation to the moon.
The future belongs to those who can query raw GA4 data in BigQuery, apply SQL logic, automate SQL generation via AI and drive insights beyond what GA4 UI can offer.
Related Articles:
- GA4 BigQuery Video Tracking Report.
- Counting GA4 Sessions in BigQuery? Watch for These Caveats.
- Calculating User Paths in GA4 BigQuery.
- Calculating Conversion Paths in GA4 BigQuery.
- Don’t Aggregate Unconsented Events in GA4 BigQuery.
- How to track file downloads in GA4 BigQuery.
- How to create GA4 Content Group Report in BigQuery.
- How to create GA4 Site Search Tracking report in BigQuery.
- How to track outbound / external links in GA4 BigQuery data table.
- How to track GA4 BigQuery Schema Change.
- Stop Splitting GA4 Tables in BigQuery Keep Them Nested.
- How To Correctly Calculate GA4 Active Users in BigQuery.
- How to Calculate GA4 Engaged Users in BigQuery.
- Stop Chasing GA4 Backfills in BigQuery.
- Google Analytics 4 Scroll Tracking Report in BigQuery.
- Google Analytics 4 Landing Page Report in BigQuery.
- Google Analytics 4 Exit Page Report in BigQuery.
- Google Analytics 4 Landing Page Dimension in BigQuery.
- GA4 (not set) Landing Pages Show 0 Entrances in BigQuery.
- Google Analytics 4 Page Title, Page Path & Views in BigQuery