Frequently Asked Questions

How to calculate discs produced per year/month
Last Updated 9 years ago

Production information is contained within the dicom_jobs table. To calculate the number of discs produced per year/month, you can execute the following MySQL queries consecutively:

alter table dicom_jobs
add productionDate DATE;

update dicom_jobs
set productionDate = (FROM_UNIXTIME(`submitDate`/1000,"%Y-%m-%d"));

select MONTH(productionDate) as 'Month', YEAR(productionDate) as 'Year', count(*) as 'Produced discs' from dicom_jobs group by YEAR(productionDate), MONTH(productionDate);

alter table dicom_jobs
DROP COLUMN productionDate;


First this adds a column for the readable production date (productionDate), then it converts the UNIXTIME submit date to the readable productionDate, next it does the production statistics query (counting the number of discs per year/month). The final command removes the column of the readable productionDate again from the dicom_jobs table.

Please Wait!

Please wait... it will take a second!