I have a MySQL query for example:

```
select sum(qty) as qty
from myitem
where filedatetime >='2019-08-01 06:30:00'
  and filedatetime < '2019-09-01 18:30:00'

```

My table only have qty and filedatetime columns.

Based on this query is it possible to query out the following conditions:

* if filedatetime is filedatetime >= '2019-08-01 06:30:00' and filedatetime < '2019-08-01 18:30:00' then
	+ assign value 'Day' to column shift
	+ assign value '2019-08-01' to column shiftDate
* if filedatetime >= '2019-08-01 18:30:00' and filedatetime < '2019-08-02 06:30:00' then
	+ assign value 'Night' to column shift
	+ assign value '2019-08-01' to column shiftDate

So this how the result will be look like:

```
shiftDate   |   Shift   |   QTY     |
2019-08-01  |   Day     |   10      |
2019-08-01  |   Night   |   12      |
2019-08-02  |   Day     |   11      |
2019-08-02  |   Night   |   15      |
2019-08-11  |   Day     |   11      |
2019-08-11  |   Night   |   18      |
2019-08-12  |   Day     |   13      |
2019-08-12  |   Night   |   19      |

```