Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. CREATE TABLE lists (
  2. listId int,
  3. itemId int,
  4. PRIMARY KEY (listId, itemId)
  5. );
  6.  
  7. select listId
  8. from lists
  9. where itemId in (10, 20, 30)
  10. group by listId
  11. having count(distinct itemId) = 3;
  12.  
  13. q
  14. .groupBy(_.listId)
  15. .map {
  16. case (listId, group) => (listId, group.map(_.itemId).filter(_ inSet Set(10, 20, 30)).countDistinct)
  17. }
  18. .filter(_._2 > 3)
  19.  
  20. scala.slick.SlickException: No type for symbol s2 found for Ref s2
  21. at scala.slick.ast.Ref.nodeWithComputedType2(Node.scala:501) ~[slick_2.11-2.1.0.jar:na]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement