All Questions
10 questions
-2
votes
1
answer
276
views
Daily average from a 15mins interval datetime column o
I want to convert this 15 minutes interval data into daily average such that in the output file, I should have only two columns 'Date' and 'Daily_Avg_Value'.
This is my first post here - really wish ...
0
votes
3
answers
383
views
How to re-write this query or restructure my table for SPEED
I have an InnoDB MySQL table of this structure:
column
type
service
varchar(16)
url
varchar(255)
datetime
datetime
It contains logs for requests made to one of multiple services. It contains ~3 ...
0
votes
2
answers
308
views
Aggregating data by group and time gaps
I've got a postgresql+postgis database filled with GPS data:
CREATE TABLE "my_table" (
"id" serial NOT NULL PRIMARY KEY,
"gps_id" text NOT NULL,
"lat" numeric NOT NULL,
"lon" ...
2
votes
1
answer
33
views
Add Gameweek Fixeture based on Datefield
having the following table i need to add a new Column called "Round" to represent Round 1, Round 2 and so on, based on the Date Column in the table. Same Round should be given to matches happening in ...
2
votes
0
answers
557
views
Delete rows within a given time interval
I have created a table with the following values:
create table MyTable (id int, dtdate datetime, serialNum int, serialCode int, status int);
insert into MyTable values
(1, 2012-12-20 01:01:00, 1, 10, ...
6
votes
2
answers
28k
views
How to get minimum and maximum for grouped timestamps
I would love to know how to create a view that groups timestamps in 10 minute nearest 10 minute intervals and contains each minimum and maximum timestamp for each.
So a table that looks like this:
| ...
1
vote
2
answers
405
views
Group by month in result columns?
I'm using this DBMS: Caché
I've never used a pivot table in SQL and I'm not even good at it in Excel, but I assume that's what I need. Given the following sample data:
ID Name Result Date
...
7
votes
1
answer
129k
views
Grouping data by MONTH on DATETIME column in SQL Server
I have a table Employee which has the columns Id, Date of joining and Name
Date of joining is a DATETIME column.
I want to know how many users have joined in the month of October?
2
votes
1
answer
4k
views
Breaking down by minutes in between two dates
In MySQL, I've got a data model with a "visit" table that has start and end datetimes.
How can I get a breakdown of the number of visits that are active per minute?
e.g.
| visit_id | start | end |...
2
votes
1
answer
2k
views
Grouping over multiple data dimensions (pivot)
I am logging an Events table, and want an output (as seen at the bottom of this answer), the issue is that I am getting the data in rows, but want them to be displayed column-wise.
The two dimensions ...