Skip to main content

Basic Check-ins Queries

This guide provides simple, ready-to-use SQL queries for Planning Center Check-ins data. Each query is designed to answer common ministry questions without requiring deep SQL knowledge.

Query Customization Required

These example queries demonstrate common patterns but may require adjustments to match your specific database schema and field names. Test thoroughly in your environment before use.

Query Requirements

Schema Prefix

IMPORTANT: All tables in the Planning Center Check-ins module live in the planning_center schema. Always prefix table names with planning_center. when writing queries. ✅ CORRECT: SELECT * FROM planning_center.checkins_checkins ❌ INCORRECT: SELECT * FROM checkins_checkins

Row Level Security (RLS)

Row Level Security automatically enforces:
  • tenant_organization_id – results limited to your organization
  • system_status – only active records returned by default
Skip manual filters for these columns—RLS already applies them and redundant predicates can slow queries or mask data:
  • WHERE tenant_organization_id = 1
  • WHERE system_status = 'active'
Focus your WHERE clauses on ministry-specific logic while trusting the database to keep tenant and status filters in place.

Today’s Attendance

Who Checked In Today?

Count Total Attendance by Type

Currently Checked In (Not Yet Checked Out)

Location-Based Queries

Check-ins by Location

Room Capacity Status

Guest Tracking

First-Time Guests This Week

Guest vs Regular Comparison

Volunteer Management

Today’s Volunteers

Volunteer Coverage by Hour

Weekly Patterns

Attendance by Day of Week (Last 30 Days)

Peak Check-in Times

Event Analysis

Recent Events with Attendance

Event Frequency Settings

Security and Safety

Security Codes in Use Today

Emergency Contact Information

Medical and Special Needs

Check-ins with Medical Notes

Time-Based Analysis

Average Check-in Duration

Busiest Check-in Days (Last 3 Months)

Tips for Using These Queries

  1. Dates: Replace CURRENT_DATE with specific dates like '2024-01-07' to query historical data
  2. Limits: Add LIMIT 10 to any query to see just the first 10 results
  3. Sorting: Change DESC to ASC if you want to reverse the sort order
  4. Filtering: Add more WHERE conditions to narrow your results

Next Steps

Ready for more complex analysis? Check out: