← ダッシュボードへ戻る

🛠️ SQL分析サンドボックス

📚 テーブル定義 (Cheatsheet)

exam_sessions

受験1回ごとの記録

  • id (String/CUID)
  • userId (String)
  • startedAt (DateTime)
  • endedAt (DateTime?)
  • score (Int?)
  • isPassed (Boolean)
  • questionIds (String[])
exam_answers

1問ごとの回答詳細

  • id (Int)
  • examId (FK) ※sessionId
  • questionId (FK)
  • answerSql (String) ※userSql
  • isCorrect (Boolean)
  • durationSec (Int)
questions

問題マスタ

  • id (String/UUID)
  • title (String)
  • text (String)
  • correctSql (String)
  • difficulty (Int)
  • category (String)
  • targetTable (String)
payments

決済履歴

  • id (String/CUID)
  • userId (String)
  • amount (Int) ※支払額
  • originalAmount (Int?) ※割引前
  • discountAmount (Int?) ※割引額
  • couponCode (String?) ※クーポン
  • status (String) ※succeeded等
  • createdAt (DateTime)
  • completedAt (DateTime?)
⚠️ Warning: DELETEやUPDATEも実行可能です。本番データの操作には注意してください。