« first day (1801 days earlier)      last day (857 days later) » 

6:44 AM
Hi Can somebody help me with getting this right
select GROUP_CONCAT(CONCAT(count(*) Jobs,' ', partners.name) separator ',' ) as Partner from jobs,customers, partners where customers.partner_id = partners.id and jobs.customer_id = customers.u_key and (jobs.status=100 or jobs.status=8) and jobs.created_at between '2016-02-08 00:00:00' and '2016-02-09 00:00:00' group by customers.partner_id; I get invalid use of group function
 
 
5 hours later…
11:22 AM
hi @TehShrike
have a question, I have to manage "times" within my database on postgresql. This time notion will result in values entered by user like this :
HH:MM only ! in 24h system, so 14:30 or something.
When entering these values in db, which data type should I use? seperate in 2 fields (like hour/minute) and use "text" or "integer"? I'm a bit confused about it...
Later I'll have to fetch records with conditions like "which is between 7 am and 2 pm (7->14)" and so on
thanx
 
 
3 hours later…
2:03 PM
@upagna your life will be much easier if you use real JOIN clauses instead of putting multiple tables in your FROM
@upagna could you paste the entire error message?
@Julo0sS MySQL has a TIME data type, I would bet that Postgres does as well. That is what I'd use.
 
2:38 PM
@TehShrike Hey, yeah I noticed but it's kinda "timestamp" related isn't it?
 
@Julo0sS If you want to store the date component too, yeah
 
This is not "useful" to me since a timestamp will keep in memory "year/month/day" value (default aswell) but I don't care about it... :/
What would be "good" to me is some kind of "day timestamp" timestamp going from 0 to 60*24 and then convert it to "hh:mm"
 
@Julo0sS why not... the TIME type?
 
honestly idk, that's why I'm here, i'm looking for the best data type in terms of perfs since I will have to make queries on its values later
and there will be many records
dealing with "text" will be too long
 
If you want to store a time without a date component, I would use the TIME type.
 
3:32 PM
Hey anybody here?
 
4:04 PM
@Nabeel As the topic says, Ask your question, and then hang around a while to see if an expert looks back at their screen and answers it!
 

« first day (1801 days earlier)      last day (857 days later) »