当前位置:网站首页>查询表中开始日期与结束日期
查询表中开始日期与结束日期
2022-07-30 16:52:00 【莫欺少中老年穷】
查询表中开始日期与结束日期
select startTime ,endTime from
(
select create_time as startTime, 1 as 'id' from
(
select DISTINCT(create_time)
from wifi_third_history_flow_information
ORDER BY UNIX_TIMESTAMP(create_time) DESC limit 1
) as temp
) A
join
(
select create_time as endTime, 1 as 'id' from
(
select DISTINCT(create_time)
from wifi_third_history_flow_information
ORDER BY UNIX_TIMESTAMP(create_time) ASC limit 1
) as temp
) B
on A.id = B.id;
#方式二
select create_time from (
select create_time from
(
select DISTINCT(create_time)
from wifi_third_history_flow_information
ORDER BY UNIX_TIMESTAMP(create_time) DESC limit 24
) as temp limit 1 )
as a
UNION
select create_time from (
select create_time from
(
select DISTINCT(create_time)
from wifi_third_history_flow_information
ORDER BY UNIX_TIMESTAMP(create_time) ASC limit 24
) as temp limit 1 )
as b
边栏推荐
猜你喜欢
随机推荐
Explore CSAPP Experiment 2-bomb lab-Section 1
向量检索基础方法总结
哎,这要人老命的缓存一致问题啊
华为云数据治理生产线DataArts,让“数据'慧'说话”
data storage
DTSE Tech Talk丨第2期:1小时深度解读SaaS应用系统设计
微信小程序picker滚动选择器使用详解
Mirror stand to collect
数据库的三大范式
数组和指针(2)
Minio 入门
You are a first-class loser, you become a first-class winner
新零售saas小程序如何探索数字化门店的破局之路?
Daily practice------Generate 13-digit bar, Ean-13 code rule: The thirteenth digit is the check code obtained by the calculation of the first twelve digits.
LeetCode318: Maximum product of word lengths
KDD‘21推荐系统离散特征表征无embedding table Learning to Embed Categorical Features without Embedding Tables for
Navisworks切换语言
Tensorflow中实现正则化
@Bean注解详解
字符串复制、拼接、比较以及分割函数总结(一)

![[Geek Challenge 2020] Roamphp1-Welcome](/img/3b/2fa91f7478b8abf6efe0feafd24e58.png)



![[HarekazeCTF2019]Avatar Uploader 1](/img/2c/6dde7b8d34ba0deb334b4283e1e30e.png)


![[MRCTF2020]Ezaudit](/img/80/d4656abdff20703591ffdc3f5a5ebc.png)
