Peter_175 Peter_175 - 1 year ago 83
Ruby Question

posgres, find 3 top student in multi weekend

I have table


in weekend 1: id:1, students:[1,2,3,4,5], date:2016-11-05

in weekend 2: id:2, students:[1,3,4,5,9], date:2016-11-12

in weekend 3: id:3, students:[1,4,5,9,10], date:2016-11-19

Result I want to get top 3 top students: 1,4,5

Is it possible to write this to query?

Answer Source

Yes, it is possible to write that query.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download