#!/bin/bash
docker exec supabase-db psql -U supabase_admin -d sneakerpicks -c "SELECT id, name, clicks_7d FROM products WHERE clicks_7d > 0 ORDER BY clicks_7d DESC LIMIT 10;"
echo "---SEP1---"
docker exec supabase-db psql -U supabase_admin -d sneakerpicks -c "SELECT product_id, COUNT(*) FROM page_views WHERE created_at >= NOW() - INTERVAL '7 days' AND product_id IS NOT NULL GROUP BY product_id ORDER BY count DESC LIMIT 10;"
echo "---SEP2---"
docker exec supabase-db psql -U supabase_admin -d sneakerpicks -c "SELECT product_id, COUNT(*) FROM click_events WHERE created_at >= NOW() - INTERVAL '7 days' GROUP BY product_id ORDER BY count DESC LIMIT 10;"
