当前位置:网站首页>Using union to sort MySQL
Using union to sort MySQL
2022-07-26 20:51:00 【xixiyuguang】
EXPLAIN SELECT * from (
select * from ( SELECT
*
FROM
article
WHERE
top_start_time <= now() AND top_end_time >= now()
AND show_status = 1
AND top_status = 1
AND mark > 0 ORDER BY top_sort_num asc limit 100000 )
as t1
UNION
select * from (
SELECT
*
FROM
article
WHERE
show_status = 1
AND mark > 0 ) as t2
) as t
ORDER BY create_time desc
LIMIT 100
边栏推荐
- Keepalived高可用介绍与配置详解
- Keepalived high availability introduction and configuration details
- 【PyQt5基本控件使用解析】
- Correct the classpath of your application so that it contains compatible versions of the classes com
- Buu brush inscription 4
- 深度可分离卷积(DepthwiseSeparableConvolution):Depthwise卷积与Pointwise卷积
- Message queue -- the problem introduced: repeated consumption & sequential consumption & distributed transactions
- How to assemble a registry?
- Build Prometheus automatic monitoring and alarm system from scratch
- Chat software project development 2
猜你喜欢

Pandonia spirit voxedit creation competition

Group convolution

Kotlin - coroutinecontext

Ape tutoring's technological hard power: let AI start from reading children's homework

易基因|宏病毒组测序技术介绍

When there are many query fields, you can add ordinary query and advanced query
![Installation and configuration of [basic services] [database] Clickhouse](/img/fe/5c24e4c3dc17a6a96985e4fe97024e.png)
Installation and configuration of [basic services] [database] Clickhouse

NVIDIA canvas first experience~
![[基础服务] [数据库] ClickHouse的安装和配置](/img/fe/5c24e4c3dc17a6a96985e4fe97024e.png)
[基础服务] [数据库] ClickHouse的安装和配置

BGP的基本配置和聚合
随机推荐
Why can ThreadLocal achieve thread isolation?
Numpy中ndarray的常见操作
[基础服务] [数据库] ClickHouse的安装和配置
The 50 Smartest Companies in the world announced that Chinese manufacturers account for nearly half, and Huawei ranks first
Applied materials announced that it would acquire international electric with us $2.2 billion in cash
[wechat applet] zero basics | applet syntax
Opencv DNN deployment onnx model
YGG cooperates with my pet hooligan, AMGI's flagship NFT project, to enter the rabbit hole
leetcode 数组类
Shell综合应用案例,归档文件
Single core A7 plays with face recognition, and NXP "crossover processor" plays a new trick!
Houdini 笔记2
【微信小程序】零基础学 | 小程序语法
Shell函数、系统函数、basename [string / pathname] [suffix] 可以理解为取路径里的文件名称 、dirname 文件绝对路径、自定义函数
[experiment sharing] CCIE BGP routing black hole experiment]
Chat software project development 2
Marketing and sales document management and workflow solutions
How to assemble a registry?
Houdini 求中点,点连成线
拦截器、、