> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getparable.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

# Planning Center Check-ins SQL Queries

## Transform Your Check-in Data Into Ministry Insights

Your check-in system is the heartbeat of your weekend services and events. With Parable's SQL access to Planning Center Check-ins data, you can analyze attendance patterns, optimize volunteer placement, and ensure child safety—all with nightly-synchronized data at your fingertips.

## Quick Start

Ready to see who checked in today? Here's your first query:

```sql theme={null}
-- See the 10 most recent check-ins
SELECT
    c.check_in_id,
    c.first_name,
    c.last_name,
    c.kind,  -- 'Regular', 'Guest', 'Volunteer'
    c.security_code,
    c.created_at as checked_in_at,
    c.checked_out_at
FROM planning_center.checkins_checkins c
WHERE c.created_at >= CURRENT_DATE
ORDER BY c.created_at DESC
LIMIT 10;
```

## What You Can Do With Check-ins Queries

### 👥 Track Attendance Patterns

* Monitor weekly service attendance trends
* Compare attendance across different service times
* Identify seasonal patterns in attendance
* Track first-time guest retention

### 👶 Manage Children's Ministry

* Monitor classroom capacity and ratios
* Track volunteer-to-child ratios with current data
* Analyze age group distributions
* Generate security reports for child safety

### 🙋 Optimize Volunteer Placement

* Identify understaffed locations
* Track volunteer attendance and reliability
* Balance volunteer assignments across services
* Monitor volunteer check-in patterns

### 📊 Generate Leadership Reports

* Create attendance dashboards for leadership
* Track growth metrics across campuses
* Monitor event effectiveness
* Export data for strategic planning

## Available Tables

Your Planning Center Check-ins data is organized into these main tables:

| Table                     | What It Contains                    | Key Use Cases                          |
| ------------------------- | ----------------------------------- | -------------------------------------- |
| `checkins_checkins`       | Individual check-in records         | Attendance tracking, security codes    |
| `checkins_people`         | People who check in                 | Person profiles, contact info          |
| `checkins_events`         | Event definitions                   | Service times, recurring events        |
| `checkins_event_times`    | Specific times for events           | Service schedules, time-based analysis |
| `checkins_locations`      | Physical or logical locations       | Rooms, classrooms, volunteer areas     |
| `checkins_event_periods`  | Check-in sessions                   | Service-specific attendance            |
| `checkins_headcounts`     | Manual attendance counts            | Total attendance tracking              |
| `checkins_check_in_times` | Times people checked into locations | Location-specific attendance           |
| `checkins_labels`         | Print labels for check-ins          | Name tags, security labels             |
| `checkins_stations`       | Check-in kiosk stations             | Station performance, usage patterns    |

## Understanding Relationships

Just like with other Planning Center data, Check-ins stores relationships in separate tables to maintain data integrity:

* `checkins_checkin_relationships` - Links check-ins to people, events, locations
* `checkins_event_relationships` - Links events to related entities
* `checkins_location_relationships` - Links locations to events and parent locations
* `checkins_event_time_relationships` - Links event times to events and locations

We'll show you exactly how to join these tables in our examples!

## Common Check-ins Scenarios

### Finding Today's Check-ins by Location

```sql theme={null}
-- Get check-ins grouped by location for today
SELECT
    l.name as location_name,
    l.kind as location_type,
    COUNT(DISTINCT c.check_in_id) as total_checkins,
    COUNT(DISTINCT CASE WHEN c.kind = 'Regular' THEN c.check_in_id END) as regular_checkins,
    COUNT(DISTINCT CASE WHEN c.kind = 'Guest' THEN c.check_in_id END) as guest_checkins,
    COUNT(DISTINCT CASE WHEN c.kind = 'Volunteer' THEN c.check_in_id END) as volunteer_checkins
FROM planning_center.checkins_checkins c
JOIN planning_center.checkins_checkin_relationships cr
    ON c.check_in_id = cr.checkin_id
    AND cr.relationship_type = 'Location'
JOIN planning_center.checkins_locations l
    ON cr.relationship_id = l.location_id
WHERE DATE(c.created_at) = CURRENT_DATE
GROUP BY l.name, l.kind
ORDER BY total_checkins DESC;
```

### Tracking Volunteer Coverage

```sql theme={null}
-- Check volunteer-to-child ratios by location
SELECT
    l.name as location,
    l.attendees_per_volunteer as required_ratio,
    COUNT(DISTINCT CASE WHEN c.kind = 'Regular' THEN c.check_in_id END) as children,
    COUNT(DISTINCT CASE WHEN c.kind = 'Volunteer' THEN c.check_in_id END) as volunteers,
    CASE 
        WHEN COUNT(DISTINCT CASE WHEN c.kind = 'Volunteer' THEN c.check_in_id END) > 0
        THEN ROUND(COUNT(DISTINCT CASE WHEN c.kind = 'Regular' THEN c.check_in_id END)::NUMERIC / 
                   COUNT(DISTINCT CASE WHEN c.kind = 'Volunteer' THEN c.check_in_id END), 1)
        ELSE NULL
    END as actual_ratio
FROM planning_center.checkins_locations l
LEFT JOIN planning_center.checkins_checkin_relationships cr
    ON l.location_id = cr.relationship_id
    AND cr.relationship_type = 'Location'
LEFT JOIN planning_center.checkins_checkins c
    ON cr.checkin_id = c.check_in_id
    AND DATE(c.created_at) = CURRENT_DATE
    AND c.checked_out_at IS NULL  -- Only currently checked in
WHERE l.kind = 'Folder'  -- Physical locations
    AND l.child_or_adult = 'child'
GROUP BY l.name, l.attendees_per_volunteer
ORDER BY l.name;
```

## Next Steps

📚 **New to SQL?** Start with [Basic Queries](/planning-center/check-ins/basic-queries) for simple, powerful queries you can use today.

🚀 **Ready for More?** Check out [Advanced Queries](/planning-center/check-ins/advanced-queries) for complex analysis and reporting.

📊 **Need Reports?** See [Reporting Examples](/planning-center/check-ins/reporting-examples) for complete, production-ready reports.

🔍 **Want Details?** Review the [Data Model](/planning-center/check-ins/data-model) for complete table documentation.

## Common Questions

### What's the difference between an Event and an Event Time?

* An **Event** is the recurring definition (e.g., "Sunday Service")
* An **Event Time** is a specific instance (e.g., "Sunday Service at 9:00 AM on Jan 7, 2024")
* Event Periods represent active check-in sessions

### How do I find people who haven't checked out?

Look for records where `checked_out_at IS NULL`:

```sql theme={null}
SELECT first_name, last_name, security_code, created_at
FROM planning_center.checkins_checkins
WHERE checked_out_at IS NULL
  AND DATE(created_at) = CURRENT_DATE
ORDER BY created_at DESC;
```

### What does the 'kind' field mean?

The `kind` field identifies the type of check-in:

* `Regular` - Standard attendee (usually children)
* `Guest` - First-time or visiting attendee
* `Volunteer` - Someone serving in ministry

### How do I track first-time guests?

Check for the `one_time_guest` flag or `kind = 'Guest'`:

```sql theme={null}
SELECT COUNT(*) as first_time_guests
FROM planning_center.checkins_checkins
WHERE one_time_guest = true
  AND DATE(created_at) >= CURRENT_DATE - INTERVAL '7 days';
```

## Getting Help

* 🐛 Found an issue? Report it at [github.com/getparable/parable-api/issues](https://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 attendance data tells a story of growth and engagement. Let's help you understand it.*
