🏠 홈
벤치마크
📊 모든 벤치마크 🦖 공룡 v1 🦖 공룡 v2 ✅ 할 일 목록 앱 🎨 창의적인 자유 페이지 🎯 FSACB - 궁극의 쇼케이스 🌍 번역 벤치마크
모델
🏆 톱 10 모델 🆓 무료 모델 📋 모든 모델 ⚙️ 킬로 코드 모드
리소스
💬 프롬프트 라이브러리 📖 AI 용어 사전 🔗 유용한 링크
intermediate

Designing Efficient SQL Queries

#sql #database #query-optimization

Create optimized SQL queries for data retrieval

I need to design a SQL query for a database with tables: users (id, name, email, created_at), orders (id, user_id, total, status, date), and order_items (id, order_id, product_id, quantity, price). The query should return the top 10 customers by total spending in the last 30 days, including their name, email, total spent, and number of orders. The query should be efficient and handle large datasets.