You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATETABLEuser_info (
id primary_key integer, -- ユーザーID
name text,
mail text,
hashed_password text, -- ハッシュ化されたパスワードpointinteger) -- スコアCREATETABLEscore (
id primary_key integer,
problem_id integer,
solved bool
solved_time text)
CREATETABLEproblem (
problem_id integer primary_key,
pointinteger, -- 問題の配点
type text, -- 問題のタイプ(例:web, network, misc…)
title text, -- 問題タイトル (例:テスト問題)
body text, -- 問題の本文 htmlで格納
hint text)
各DBの中身の例:
sqlite>SELECT*FROM user_info;
id name mail hashed_password point---------- ---------- ---------- --------------- ----------1 admin admin@org password 02 jtwp470 jtwp470.ne password 1013 tango vim@vim.or vimpass 300
sqlite>SELECT*FROM score;
id problem_id solved
---------- ---------- ----------21 true
22 true
23 false
31 false
32 true
33 true
sqlite>SELECT*FROM problem;
problem_id point type title body hint
---------- ---------- ---------- ------------ ---------- ----------11 misc test problem no des No hint
2100 web web filer no des No hint
3200 misc shock? shock! No hint
各ユーザーの得点を算出
sqlite>SELECTSUM(point) FROM score INNER JOIN problem ONscore.problem_id==problem.problem_idWHERE id =2AND solved ="true"; -- ユーザー2の得点SUM(point)
----------101
sqlite>SELECTSUM(point) FROM score INNER JOIN problem ONscore.problem_id==problem.problem_idWHERE id =3AND solved ="true"; -- ユーザー3の得点SUM(point)
----------300
The text was updated successfully, but these errors were encountered:
各DBの中身の例:
各ユーザーの得点を算出
The text was updated successfully, but these errors were encountered: