2

I have this query

select count(*) from sl_list 
where type = 'pantry'

which returns thousands of rows that looks like this:

    uuid     type      create_dtime               mod_dtime
 124234525   pantry     2012-06-13 15:25:58       2012-06-13 15:27:51

I want to adjust the query so that there is another where clause that states:

select count(*) from sl_list 
where type = 'pantry'
and "if create_dtime and mod_dtime are not the same day (i dont care about hours)"

Thank you for your help.

4

1 回答 1

1
select count(*) from sl_list 
where type = 'pantry'
and date(create_dtime) <> date(mod_dtime)
于 2012-11-30T00:51:32.613 回答