PHP-Scripte PHP-Tutorials PHP-Jobs und vieles mehr

PHP-Scripte PHP-Tutorials PHP-Jobs und vieles mehr (https://www.php-resource.de/forum/)
-   SQL / Datenbanken (https://www.php-resource.de/forum/sql-datenbanken/)
-   -   Group by Date (UNIX Timestamp) (https://www.php-resource.de/forum/sql-datenbanken/106676-group-by-date-unix-timestamp.html)

Kidbooo 29-07-2019 12:09

Group by Date (UNIX Timestamp)
 
Hello everyone,,
Here's my problem:

Table
- id (int)
- value1 (varchar)
- value2 (varchar)
- value3 (varchar)
- date (int) [unix timestamp]

I need 3 different outputs:

Value1-3 of the
- last 30 days
- last 30 Weeks
- Last 30 Months Spending

the last 30 days xvideos.onl/ xnxx.onl/ chaturbate.onl/ is not a problem, but in the last 30 weeks you have to add the values ​​of the 7 days of the week.

How do I do that? So BETWEEN is clear to me, but I have not a clue how to add for a week (no more, not less).

Ex:
Days: 1, 2, 3, 4, 5, 6, 7 | 1, 2, 1, 2, 1, 2, 3 | ...
Weeks: 28 | 12 | ...
months: 40 | ...

ask for help, thank you!


Alle Zeitangaben in WEZ +2. Es ist jetzt 04:11 Uhr.

Powered by vBulletin® Version 3.8.2 (Deutsch)
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
[c] ebiz-consult GmbH & Co. KG