web2py Web Framework ()
headers
pkomor
|
21 Jun 2012 09:11
count a grouped select
pkomor <
francisco.mora.sanchez@...
>
2012-06-21 07:11:41 GMT
There
db(
query).c
ount()
, but
, what is
the correct way to
count the number
of rows that
have a
grouped
select,
db
(query
).
s
elect(
groupby
)?
Thanks
--
Permalink
|
Reply
|
headers
Vasile Ermicioi
|
21 Jun 2012 15:46
Re: count a grouped select
Vasile Ermicioi <
elffikk@...
>
2012-06-21 13:46:12 GMT
and how will do that in sql? and you will get the response
try
_select1 = db
(query
)._
s
elect(
db.table.id
,
groupby
)
_count = db(db.table.id.belongs(
_select1)).count()
--
Permalink
|
Reply
|
Return
Return to
gmane.comp.python.web2py
.
Project Web Page
web2py Web Framework ()
Search Archive
Language
Change language
Options
Current view: Threads only / Showing whole messages / Not hiding cited text.
Change to
All messages,
shortened messages
, or
hide cited text
.
Post a message
NNTP Newsgroup
Classic Gmane web interface
RSS Feed
List Information
About Gmane
Gmane