A comprehensive PostgreSQL database containing 6.45 million FTC scam complaint records from 2022-2025.
- Total Records: 6,451,793
- Unique Phone Numbers: 4,912,815
- States Affected: 70
- Date Range: 2022-05-27 to 2025-07-31
- Robocall Complaints: 3,659,873
-
Clone this repository:
git clone https://github.com/joemo/ftc-scam-database.git cd ftc-scam-database -
Run the setup script:
chmod +x teammate_setup.sh ./teammate_setup.sh
-
Connect to the database:
- Host: localhost
- Port: 5433
- Database: ftc_scam_data
- Username: ftc_user
- Password: ftc_password
-
Start the database:
docker compose up -d
-
Access pgAdmin (web interface):
- URL: http://localhost:8080
- Email: admin@example.com
- Password: admin
SELECT COUNT(*) FROM ftc_complaints;SELECT company_phone_number, COUNT(*) as complaint_count
FROM ftc_complaints
GROUP BY company_phone_number
ORDER BY complaint_count DESC
LIMIT 20;SELECT consumer_state, COUNT(*)
FROM ftc_complaints
GROUP BY consumer_state
ORDER BY COUNT(*) DESC
LIMIT 10;SELECT * FROM ftc_complaints
WHERE created_date >= '2024-01-01'
ORDER BY created_date DESC
LIMIT 10;-- Get phone numbers with most complaints
SELECT company_phone_number, COUNT(*) as complaints
FROM ftc_complaints
GROUP BY company_phone_number
HAVING COUNT(*) > 10
ORDER BY complaints DESC;-- Get states with most complaints
SELECT consumer_state, COUNT(*) as complaints
FROM ftc_complaints
GROUP BY consumer_state
ORDER BY complaints DESC;-- Get complaints by month
SELECT DATE_TRUNC('month', created_date) as month,
COUNT(*) as complaints
FROM ftc_complaints
GROUP BY month
ORDER BY month;ftc-scam-database/
βββ docker-compose.yml # Database and pgAdmin setup
βββ init.sql # Database schema
βββ teammate_setup.sh # Quick setup script
βββ TEAMMATE_INSTRUCTIONS.md # Detailed instructions
βββ README.md # This file
βββ .gitignore # Git ignore rules
If port 5433 is busy, change it in docker-compose.yml:
ports:
- "5434:5432" # Change 5433 to 5434Check logs:
docker logs ftc-scam-dbVerify the container is running:
docker ps | grep ftc-scam-dbcompany_phone_number: The phone number that received the complaintcreated_date: When the complaint was createdviolation_date: When the violation occurredconsumer_city: City of the consumerconsumer_state: State of the consumerconsumer_area_code: Area code of the consumersubject: Subject of the complaintrecorded_message_or_robocall: Whether it was a robocallsource_file: Original CSV file sourcedownload_date: When the data was downloadedcreated_at: Database record creation timestamp
- Host: localhost
- Port: 5433
- Database: ftc_scam_data
- Username: ftc_user
- Password: ftc_password
- URL: http://localhost:8080
- Email: admin@example.com
- Password: admin
For issues or questions:
- Check the troubleshooting section above
- Review
TEAMMATE_INSTRUCTIONS.md - Check container logs with
docker logs ftc-scam-db - Contact the development team
This database provides:
- Comprehensive Coverage: Every FTC complaint since 2022
- Real-time Access: Instant query capabilities
- Analytics Power: Deep insights into scam patterns
- Compliance Support: Regulatory reporting capabilities
- Competitive Advantage: Unique, comprehensive dataset
Database: 6.45M FTC scam records
Coverage: 2022-2025
Status: β
Ready for Production