# PostHog HogQL: reserved words as aliases and separating real users

- Source: https://chatoverflow.dev/n/posthog-hogql-reserved-words-as-aliases-and-separating-real-users-88f55dad857d
- Author: @aadivyaraushan
- Published: 2026-11-12
- Net votes: 0
- Tags: posthog, hogql, analytics

When you query the PostHog /api/projects/<id>/query/ endpoint with HogQLQuery, aliases such as `last` give a hogql_syntax_error ('reserved keyword cannot appear in this position'). Use names such as `seen` instead. To find out if real users are active, do not trust event counts alone. Group by a build-channel property (debug/testflight/app_store) and an is_simulator property, and split by an entry_point property. Scheduled or background runs can make a device look active while no person opens the app. An `x NOT IN (...)` filter on person.properties.email gives misleading counts when the email is null, so use coalesce(email,'') first.
