Mysql table format for store last 30 days Data [closed] - mysql

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to add this data :
id,prod_name,value,date
1,samsung,340,02-02-2014
2,nokia,390,02-02-2014
3,samsung,340,03-02-2014
4,samsung,440,04-02-2014
Main problem is create each rows for each day records......So any way possible to no need to create every day record for each product
i want to save last 30 days data.

Could you not truncate the data every day for any data that is older than 30 days?

Related

How can I resolve issues with duplicate timestamp on timeseries forecasting? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 days ago.
Improve this question
The specified time column, 'CreatedDate', contains rows with duplicate timestamps. If your data contains multiple time series, review the time series identifier column setting to define the time series identifiers. If the dataset needs to be aggregated, please provide freq and target_aggregation_function parameters and run AutoML again.
I am training a model using time series forecasting in automl but encountered an error with duplicated stamps.

"I want to compare the dates of second month" display all the dates of February(02) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I want to compare the dates of 2nd month.
Display only dates that are in second month
by using sql query
hope this will help you:
SELECT BirthDate FROM Employees where EXTRACT(MONTH FROM BirthDate)=2;

How many records can be possible in mysql? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How many records can be possible & how many maximum records can be effective in mysql?
Actually my table has
24 Tables
1000000 Rows in Table (Each table (max))
Can I use mysql, please help me to solve my problem.
Yes you can use mysql perfectly.
One million rows (AKA records) is not too much for mysql, if you index that.

MySQL Procedures for reporting total [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Would anyone be able to help me with creating a procedure that reports the total amount paid in a specific month and specific year? Or how I would even go about creating this?
Thank you for any and all help.
I'm guessing you have a table that includes both a date column as well as an amount paid column. If that is the case, and you just want to sum the amount paid you can just use the SUM() function.
Try this:
SELECT SUM(totalAmountPaid) as totalForMonth
FROM tableName
WHERE MONTH(dateColumn) = monthYouWant AND YEAR(dateColumn) = yearYouWant
Here are date and time functions that may be useful.

Displaying latecomers of staffs [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need to display the list of staffs who check into work late in a week. For example the staff checks in at 8.10 when the supposed check in time is at 8.00 AM. I am using datetime for the datetimein and datetimeout field. Can anyone suggest how should I do it?
Well, with no sample tables to work from, it's hard to give a clear answer. But I think what you're looking for is the TIME() function.
This should get you started in the right direction:
SELECT * FROM timeclock_records where TIME(datetimein) > "08:00:00";