Planning Center Calendar SQL Queries

Coordinate Your Ministry with Data-Driven Scheduling

Your church calendar is the heartbeat of ministry activity. With Parable’s SQL access to Planning Center Calendar data, you can optimize facility usage, prevent conflicts, and ensure every event runs smoothly.

Quick Start

Ready to explore your calendar data? Here’s your first query to see upcoming events:
-- See your next 10 upcoming events
SELECT 
    e.event_id,
    e.name,
    e.description,
    ei.starts_at,
    ei.ends_at,
    ei.location,
    ei.all_day_event
FROM planning_center.calendar_events e
JOIN planning_center.calendar_event_instances ei 
    ON e.event_id = ei.event_id
WHERE ei.starts_at >= CURRENT_TIMESTAMP
ORDER BY ei.starts_at
LIMIT 10;

What You Can Do With Calendar Queries

📅 Event Management

  • View all upcoming events and their details
  • Track event approval status and workflows
  • Monitor recurring events and patterns
  • Identify scheduling gaps and opportunities

🏢 Resource Management

  • Check room and equipment availability
  • Track resource bookings and conflicts
  • Analyze facility utilization rates
  • Plan maintenance around usage patterns

⚠️ Conflict Detection

  • Find double-booked resources
  • Identify scheduling conflicts
  • Prevent resource overbooking
  • Manage approval workflows

📊 Usage Analytics

  • Generate facility usage reports
  • Track event attendance patterns
  • Analyze resource utilization
  • Optimize scheduling based on data

Available Tables

Your Planning Center Calendar data is organized into these main tables:
TableWhat It ContainsKey Use Cases
calendar_eventsEvent definitions and detailsEvent information, approval status, descriptions
calendar_event_instancesSpecific occurrences of eventsEvent times, locations, recurrence patterns
calendar_resourcesRooms, equipment, and facilitiesResource inventory, availability, specifications
calendar_resource_bookingsResource reservationsBooking times, quantities, conflicts
calendar_conflictsScheduling conflictsDouble bookings, resource conflicts
calendar_event_resource_requestsResource requests for eventsPending requests, approval workflows
calendar_tagsEvent categorization tagsEvent types, ministries, categories

Understanding Relationships

Calendar data uses relationship tables to maintain flexibility:
  • calendar_events_relationships - Links events to owners, tags, and other entities
  • calendar_eventinstances_relationships - Links instances to resources and bookings
  • calendar_resources_relationships - Links resources to folders and approval groups
  • calendar_resourcebookings_relationships - Links bookings to events and resources

Next Steps

📚 New to SQL? Start with Basic Queries for simple, powerful queries you can use today. 🚀 Ready for More? Check out Advanced Queries for conflict detection and resource optimization. 📊 Need Reports? See Reporting Examples for complete facility and event reports. 🔍 Want Details? Review the Data Model for complete table documentation.

Common Questions

What’s the difference between an event and an event instance?

  • An event is the master definition (like “Sunday Service”)
  • An event instance is a specific occurrence (like “Sunday Service on Jan 7, 2024”)
  • One event can have many instances (especially for recurring events)

How do I find available resources?

Check for resources without bookings during your timeframe:
-- Find available rooms for a specific time
SELECT r.name, r.kind, r.quantity
FROM planning_center.calendar_resources r
WHERE r.kind = 'Room'
  AND NOT EXISTS (
    SELECT 1 FROM planning_center.calendar_resource_bookings rb
    WHERE rb.resource_id = r.resource_id
      AND rb.starts_at < '2024-01-15 14:00:00'  -- Your end time
      AND rb.ends_at > '2024-01-15 12:00:00'    -- Your start time
  );

How are recurring events stored?

  • The calendar_events table has the master event
  • calendar_event_instances has each occurrence
  • The recurrence field contains the recurrence pattern
  • recurrence_description provides human-readable recurrence info

What do approval statuses mean?

  • A = Approved
  • P = Pending
  • R = Rejected
  • null = No approval required

How do I handle all-day events?

All-day events have all_day_event = true and use date boundaries:
WHERE all_day_event = true
  AND DATE(starts_at) = '2024-01-15'

Common Calendar Patterns

Weekly Room Schedule

-- See what's in each room this week
SELECT 
    r.name as room_name,
    e.name as event_name,
    ei.starts_at,
    ei.ends_at
FROM planning_center.calendar_resource_bookings rb
JOIN planning_center.calendar_resources r ON rb.resource_id = r.resource_id
JOIN planning_center.calendar_event_instances ei ON rb.event_instance_id = ei.event_instance_id
JOIN planning_center.calendar_events e ON ei.event_id = e.event_id
WHERE r.kind = 'Room'
  AND ei.starts_at >= DATE_TRUNC('week', CURRENT_DATE)
  AND ei.starts_at < DATE_TRUNC('week', CURRENT_DATE) + INTERVAL '1 week'
ORDER BY r.name, ei.starts_at;

Today’s Events

-- All events happening today
SELECT 
    e.name,
    ei.starts_at::time as start_time,
    ei.ends_at::time as end_time,
    ei.location
FROM planning_center.calendar_events e
JOIN planning_center.calendar_event_instances ei ON e.event_id = ei.event_id
WHERE DATE(ei.starts_at) = CURRENT_DATE
   OR (ei.all_day_event = true AND DATE(ei.starts_at) <= CURRENT_DATE AND DATE(ei.ends_at) >= CURRENT_DATE)
ORDER BY ei.starts_at;

Getting Help

  • 🐛 Found an issue? Report it at github.com/getparable/parable-api/issues
  • 📖 Need more examples? Check our other query guides in this folder
  • 💬 Have questions? Reach out to your Parable support team

Your ministry calendar tells a story of community and service. Let’s help you manage it better.