Skip to main content

Simple, Practical SQL for Event Management

Start here to learn the fundamentals of querying Planning Center Registrations data. These examples cover common scenarios you’ll encounter in day-to-day event management.

Query Requirements

Schema Prefix

IMPORTANT: All tables in the Planning Center Registrations module live in the planning_center schema. Always prefix table names with planning_center. in your queries. ✅ CORRECT: SELECT * FROM planning_center.registrations_signups ❌ INCORRECT: SELECT * FROM registrations_signups

Row Level Security (RLS)

Row Level Security automatically filters results by:
  • tenant_organization_id – limits data to your organization
  • system_status – returns active records by default
Skip manual filters for these columns—RLS already enforces them and redundant predicates can mask data or slow execution:
  • WHERE tenant_organization_id = 1
  • WHERE system_status = 'active'
Keep your focus on event-specific filters (archived flags, dates, statuses) while RLS handles tenancy and system status automatically. Most examples on this page filter archived = false because they answer “what is happening now” questions — upcoming events, open registration windows, current waitlists. Completed events are usually archived, so drop that predicate whenever you are reporting on past events. The revenue estimate below does this deliberately.

Finding Events

List All Active Events

Find Upcoming Events

Events by Category

Registration Counts

Count Attendees per Event

Recent Registrations

Waitlist Management

View Waitlisted Attendees

Events with Waitlists

Location Information

Events by Location

Campus Events

Pricing and Selection Types

Selection-type prices show the listed value of active, non-waitlisted registrations. They do not show discounts, refunds, payment status, or money collected. Use the Giving module when you need received-payment reporting. The revenue example below includes archived signups — completed events are usually archived, so filtering them out would hide most historical revenue. Add AND s.archived = false to limit the report to non-archived (typically current and upcoming) events.

Estimated Revenue by Selection Type

Registration Volume by Event

Emergency Contacts

List Emergency Contacts for Event

Check Emergency Contact Coverage

Date and Time Queries

Events This Month

Registration Windows

People and Attendees

Find Person’s Registrations

Most Active Participants

Tips for Basic Queries

  1. Start simple - Begin with single table queries and gradually add joins
  2. Use DISTINCT carefully - Only when you need unique values
  3. Filter early - Add WHERE clauses before GROUP BY for better performance
  4. Test with LIMIT - Add LIMIT 10 when testing queries on large datasets
  5. Check for NULLs - Many fields can be NULL, use COALESCE or IS NULL checks
  6. Understand relationships - Always join through the relationship tables

Next Steps

Ready for more complex analysis? Check out our Advanced Queries guide for CTEs, window functions, and cross-module integration.