473,287 Members | 1,399 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Concurent user(not postgres user) login issue

Hi everyone!

I have a problem that I should solve in postgres sql, but I'm stuck.
The bare data is a table named activity_logs : activity_time (timestamp) | action (int4)|item 1 (varchar) | item 2 (varchar)|
This is a log table simplified.
activity_time: is a timestamp when a user login/logout is attempted.
Action: can be 1 - Login or 2 - Logout.
item 1: some product info (should be in the group by)
item 2: some other product info (should be in the group by)

The desired statement that I want to know from it:
When were most users logged in concurrently by item1, and by item 2?

I tried several ways but each has an inaccuracy. With rounding, with series, with normal select in select, for select, but hopelessly. I can't find an exact way, how to say exactly the correct aggregated number of users for each item 1 item 2 when the most user logged in.

Any idea is appreciated.
Jan 19 '23 #1
0 17661

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bennett Haselton | last post by:
I'm looking for a PHP tutorial that specializes in how to build sites that are based around user logins. i.e. the user logs in on the front page, and are taken to a main login page where fields on...
3
by: Joey Lee | last post by:
Hi, Does anyone knows how to control user login that only a single userid can login at a time? Thanks Joey
15
by: bb nicole | last post by:
The company profile showed blank after user login and click the company profile button. Supposed the company profile should not be blank and will show the company information which call from...
2
by: antonyliu2002 | last post by:
I am testing ASP.NET 2.0 Forms athentication with user credentials in SQL Server 2005. I don't want to put user credentials in web.config, so the credentials section is commented out. The...
1
by: smartic | last post by:
Login issue in this code when i enter to the login page the login form still visible how can i solve this problem ? <?php if(!($_SESSION)){ ?> <form method='post' action='Login.php'...
22
by: klenwell | last post by:
I'm in the process of refactoring the php code base I've amassed over the last few years into an object-oriented framework. I'm about to start in on the authentication/login extension and I've...
12
by: tvnaidu | last post by:
I have Two kinds of web pagess, one is for control page for only admin login, another one is to view status for user login. initially both html files can view with 192.168.0.10/control.htm and other...
4
by: sightless | last post by:
Hi all, Is it possible to capture Windows user login in Unix? We have a AIX Unix system that allows users to login (using a common login) and run scripts. At the end of the day, we cannot find out...
5
by: anewuser | last post by:
I currently have a working multi user login form in access 2007. It automatically redirects people who login to a user specific form e.g. user = staff1 is moved to form staff1 and manager1 is...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.