SELECT FLOOR(UNIX_TIMESTAMP(timestamp)/(15 * 60)) AS timekey
FROM table
GROUP BY timekey;
More Related Contents:
- MySQL Query GROUP BY day / month / year
- Using LIMIT within GROUP BY to get N results per group?
- Error related to only_full_group_by when executing a query in MySql
- Group by clause in mySQL and postgreSQL, why the error in postgreSQL?
- Error in MySQL when setting default value for DATE or DATETIME
- Grouping into interval of 5 minutes within a time range
- Retrieving the last record in each group – MySQL
- Mysql query to dynamically convert rows to columns
- MySQL “Group By” and “Order By”
- MySQL Query to select data from last week?
- MySQL convert date string to Unix timestamp
- SELECT / GROUP BY – segments of time (10 seconds, 30 seconds, etc)
- Timestamp with a millisecond precision: How to save them in MySQL
- How to convert number of week into date?
- Set NOW() as Default Value for datetime datatype?
- SQL Query to show nearest date?
- In SQL, how to select the top 2 rows for each group
- SQL Query to get column values that correspond with MAX value of another column?
- MySQL Group By and Sum total value of other column
- What does SQL clause “GROUP BY 1” mean?
- Using ORDER BY and GROUP BY together
- MySql difference between two timestamps in days?
- MySQL: How do I join same table multiple times?
- How to get current date & time in MySQL?
- MySQL GROUP BY DateTime +/- 3 seconds
- how to cast the hexadecimal to varchar(datetime)?
- When is a timestamp (auto) updated?
- MySQL Group By Hours
- mysql count group by having
- SQL query with avg and group by