Hi,
I have a simple table with singup timestamps
What I would like to do is to create a table as shown below that displays
the counts per our for the past n dates.
I can do this with a function but is there an easy way to use recursive
queries?
* Counts per hour for given date*
*HR 2020-
thanks for the suggestion. tablefunc extension might be the easiest one
On Thu, Apr 16, 2020 at 9:46 PM Edward Macnaghten
wrote:
> On 16/04/2020 14:36, Edward Macnaghten wrote:
> > On 16/04/2020 09:35, Alex Magnum wrote:
> >> Hi,
> >> I have a simple table with singu
Hi,
I have a string that I want to cut to 60 char and then remove the last
field and comma.
substring('Class V,Class VI,Class VII,Competitive Exam,Class VIII,Class
X,Class XI,Class IX,Class XII',1,60);
substring | Class V,Class VI,Class VII,Competitive Exam,Class VIII*,Class*
Now I try to remov
Hi,
I have large centralized master database for which I created a few
materialized views exclusively used by Web sites running in different
regions on their own servers.
To avoid having to connect to and pull data from across the globe I am
thinking about running small postgres instances in each
Hi,
I have two arrays which I need to combine based on the individual values;
i could do a coalesce for each field but was wondering if there is an
easier way
array_a{a, null,c, d,null,f,null} primary
array_b{null,2 ,null,4,5 ,6,null} secondary
result {a, 2, c, d,5, f,null)
Any
Yes, they are.
On Tue, Jun 25, 2019 at 4:33 AM Rob Sargent wrote:
>
>
> On Jun 24, 2019, at 2:31 PM, Alex Magnum wrote:
>
> Hi,
> I have two arrays which I need to combine based on the individual values;
> i could do a coalesce for each field but was wondering if the
Hi,
I am trying to do an upsert using a view but for some reason get errors.
All works fine without the ON CONFLICT
INSERT INTO http_stats
SELECT * FROM view_http_stats AS V WHERE month =date_trunc('month',now())
ON CONFLICT (url,ip,month) DO UPDATE
SET last_update = now(),
checks
Steve, Peter,
thanks .
Below query works. the view is used to generate the stats and not using the
table http_ping_uptime_stats . So my interpretation was that I need to
alias the view for the UPDATE to know where the value is coming from as
both have the same name.
That obviously did not work. I
Hi,
i am trying to update a table with some random dates but that does not seem
to work.
UPDATE table
SET last_update=now()::date-(SELECT (random() * 5)::INTEGER + 1)
The updated field is always set to the same. Is there a way to make it
random for every record?
I could run it through a funct