1. Helge Tjelta
  2. Valentina Database ADK
  3. 金, 6月 05 2015, 10:36 PM
  4.  メールで購読
Hi, a simple group by question.

How to I get a table to group by month when having a dato field...

SELECT COUNT(*), month(dato) AS MND
FROM SALG
GROUP BY month(dato)

will not work because I'm not allowed to use expressions in group by...

Other SQL can, not Valentina... why or what is the workaraound...

Please help...

I also need to get week number of year grouping as well.
コメント
There are no comments made yet.
Ruslan Zasukhin 承諾済みの回答
Notice: In Valentina 6.0 group by expression works already.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hi, Helge

Here's how it can be done:

SELECT COUNT(*), MND
FROM ( SELECT month( dato ) AS MND FROM SALG )
GROUP BY MND

As for the second question, can you add details or a small example, please?
コメント
There are no comments made yet.
  • ページ :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories