Ah figured out. .select_append { Sequel.function(:count).*.over(partition: quiz_snapshot. get_text('email')).as(:count) }
On Friday, May 24, 2019 at 2:03:54 AM UTC+3, genc wrote: > > I have this sql line: > > count(*) OVER (PARTITION BY sender->>'email') AS "count" > > > And I translated to this: > > .select_append { count.function.over(partition: sender.get_text('email')). > as(:count) } > > But this gives > count() > instead of > count(*) > > This causes an error. How can i add asterisk to the count? > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to sequel-talk+unsubscr...@googlegroups.com. To post to this group, send email to sequel-talk@googlegroups.com. Visit this group at https://groups.google.com/group/sequel-talk. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/04175e11-3a30-4f66-b557-0f26a1e83c53%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.