当前位置:网站首页>sql语句多字段多个值如何进行排序
sql语句多字段多个值如何进行排序
2022-08-05 01:56:00 【CSDN问答】
sql语句多字段多个值如何进行排序?需求是查询所有的列表,然后根据出发地和目的地进行排序,我是用case when 语法总是报错
sql语句如下
select swco.id,swco.order_type,swco.goods_type_id,swco.departure,swco.bounty,swco.goods_number,swco.goods_name,swco.destination,swco.goods_value,swco.goods_weight,swco.order_status,swco.end_time,swco.start_time from sys_we_chat_order swco where swco.deleted =0 order by case when departure ='北京' and destination ='衡水' then '北京' when departure ='北京' then '衡水' when destination ='衡水' then '衡水', swco.create_time desc
报错信息如下
我这么写有什么问题吗,或者其他方法如何实现
边栏推荐
- 树形查找(二叉查找树)
- Understand the recommendation system in one article: Recall 06: Two-tower model - model structure, training method, the recall model is a late fusion feature, and the sorting model is an early fusion
- 自定义线程池
- Residential water problems
- Use of pytorch: Convolutional Neural Network Module
- VOC格式数据集转COCO格式数据集
- C language basics -- pointers
- Leetcode brushing questions - 22. Bracket generation
- 记录谷歌gn编译时碰到的一个错误“I could not find a “.gn“ file ...”
- 如何基于OpenVINO POT工具简单实现对模型的量化压缩
猜你喜欢
(十七)51单片机——AD/DA转换
Leetcode刷题——22. 括号生成
[How to smash wool according to the music the couple listens to during the Qixi Festival] Does the background music affect the couple's choice of wine?
【Unity入门计划】2D游戏中遮挡问题的处理方法&伪透视
金仓数据库 KingbaseES V8 GIS数据迁移方案(3. 基于ArcGIS平台的数据迁移到KES)
基于OpenVINO工具套件简单实现YOLOv7预训练模型的部署
[Machine Learning] 21-day Challenge Study Notes (2)
开篇-开启全新的.NET现代应用开发体验
数仓4.0(三)------数据仓库系统
Programmer's list of sheep counting when insomnia | Daily anecdote
随机推荐
直播回放含 PPT 下载|基于 Flink & DeepRec 构建 Online Deep Learning
测试工作这么难找吗?今年32,失业2个月,大龄测试工程师接下来该拿什么养家?
Fragment visibility judgment
直播预告|30分钟快速入门!来看可信分布式AI链桨的架构设计
MySQL学习
汇编语言之源程序
第09章 性能分析工具的使用【2.索引及调优篇】【MySQL高级】
快速批量修改VOC格式数据集标签的文件名,即快速批量修改.xml文件名
Greenplum Database Fault Analysis - Can a Soft Connection Be Made to the Database Base Folder?
MySQL3
oracle将restful接口封装到视图中
蓝牙Mesh系统开发四 ble mesh网关节点管理
“嘀哩哩,等灯等灯”,工厂安全生产的提示音
[Word] #() error occurs after Word formula is exported to PDF
[Machine Learning] 21-day Challenge Study Notes (2)
LPQ (local phase quantization) study notes
fragment可见性判断
“配置”是把双刃剑,带你了解各种配置方法
新唐NUC980使用记录:在用户应用中使用GPIO
刷爆朋友圈,Alibaba出品亿级并发设计速成笔记太香了