Help for this page

Select Code to Download


  1. or download this
    create table questions (
       QID number constraint questions_pk primary key,
    ...
    -- But pain relief is more welcome in this case...
    insert into question_bonuses (qid, gaid, bonus)
    values (2, 6, .3);
    
  2. or download this
    select qid, question, (
           select sum(bonus) 
    ...
           ) as score
    from questions q
    order by score descending