Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object Person extends Table("person") {
- def personId = column("person_id")
- def party = column("party")
- }
- object Vote extends Table("vote") {
- def voteId = column("vote_id")
- def votingId = column("voting_id")
- def personId = column("person_id")
- def result = column("result")
- def concerns = column("concerns")
- }
- q.select(
- Vote.votingId,
- Person.party,
- Vote.concerns,
- Vote.result,
- Vote.result.count().as("qty")
- )
- .from(Vote)
- .join(Person, Person.personId == Vote.personId, db.Query2.Join.Inner)
- .where(Vote.result != "?", db.Query2.Where.And)
- .groupBy(Vote.votingId)
- .groupBy(Person.party)
- .groupBy(Vote.concerns)
- .groupBy(Vote.result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement