It is currently Sun Dec 16, 2018 8:27 pm




Post new topic Reply to topic  [ 3 posts ] 
Filter between 2 dates 
Author Message

Joined: Thu Nov 11, 2010 1:15 am
Posts: 3
Post Filter between 2 dates
Hi,

I am totaly new to the query langauge.


I have a table "verwysings" that I do a summy of "G kommentaar" and I
get the totals "Totaal" and do the percentage "Persent" and it is working fine
with the query from below, for ALL the records in the table.

But I want to go 1 step further: each record in the table "verwysings" has a date "1_Datum verwys"

I want to do the summary between two dates and not for all the records all the time.

How do I modify my group or the query or whatever is needed to search between two dates?


Please see attachment also


Thank you

Sarel van Rooyen
Afterhourspc
sarel@afterhourspc.co.za






Select
g_kommentaar,
count(*) as totaal,
(Count(g_kommentaar)* 100 / (Select Count(*) From verwysings)) as persent
From
`verwysings`
Group by
g_kommentaar


You do not have the required permissions to view the files attached to this post.


Sun Dec 19, 2010 12:32 pm
Profile E-mail

Joined: Fri Aug 22, 2008 1:03 pm
Posts: 94
Location: Australia
Post Re: Filter between 2 dates
Hi Sarel,
Add a QuickSearch to the page. Right-click on the name of the group in the explorer tree on the left of the page and select Properties from the context menu. Click on QuickSearch under the Active Plug-ins to set it up. You can then dynamically select the date range.

If you wish to always restrict the date range, then add a where clause to your query as shown in blue.

Select
g_kommentaar,
count(*) as totaal,
(Count(g_kommentaar)* 100 / (Select Count(*) From verwysings)) as persent
From
`verwysings`
where `1_Datum verwys` between '2010-01-01' and '2010-01-31'
Group by
g_kommentaar

Regards,
Richard

_________________
www.conwave.com.au


Tue Dec 21, 2010 4:30 am
Profile E-mail WWW

Joined: Thu Nov 11, 2010 1:15 am
Posts: 3
Post Re: Filter between 2 dates
:lol: Tx will try that


Tue Dec 21, 2010 10:34 am
Profile E-mail
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Copyright © 2004-2008 TheDevShop Ltd. All Rights Reserved