A complete PostgreSQL + pgAdmin setup for GitHub Codespaces, designed for database interview questions and testing.
- Open this repository in GitHub Codespaces
- Wait for the containers to start (about 2-3 minutes)
- Access pgAdmin at the forwarded port 5050
- Login with:
admin@interview.com
/admin123
- The database connection is pre-configured
- Host: db (internal) or localhost (external)
- Port: 5432
- Database: demodb
- Username: devtedsuser
- Password: devtedspass
The database includes an e-commerce schema with:
customers
- Customer informationcategories
- Product categoriesproducts
- Product catalogorders
- Customer ordersorder_items
- Order line itemsorder_summary
- View for order analytics
- Find all customers from New York
- List products with stock less than 50
- Show all orders with their customer names
- Calculate total revenue by category
- Find customers who have never placed an order
- Show the top 5 best-selling products
- Calculate running total of orders by date
- Find customers with above-average order values
- Create a report showing monthly sales trends
- Open pgAdmin in the browser
- Navigate to Servers > Interview Database > demodb
- Use the Query Tool to run your SQL
- View results in the data output panel
This setup tests knowledge of:
- Database normalization
- Primary/Foreign key relationships
- Indexing strategies
- View creation
- Query optimization
- Data modeling best practices