当前位置:网站首页>MySQL function
MySQL function
2022-07-02 19:39:00 【ekkcole】
Splicing function :concat(str,‘ Spliced characters ’)
Keep the data on the left :LEFT(str,0)
Keep the data on the right :RIGHT(str,0)
Empty function and assign value :IFNULL(str,‘ Customize ’)
Splicing function :CONCAT_WS(str,str,…)
Splicing function after grouping :GROUP_CONCAT(str,str…)
SELECT
concat(LEFT(t2.task_time,4),' year ') year,
RIGHT(t2.task_time,5) date,
IFNULL(GROUP_CONCAT( concat( t3.custom_inputs_name, '(', t3.num, t3.unit_name, ')' ) ),' No record yet ') detail,
CONCAT_WS(',',t2.image1,t2.image2,t2.image3) images
FROM
tb_farming_plot t1
LEFT JOIN tb_farming_manage t2 ON t2.record_id = t1.record_id
LEFT JOIN tb_farming_manage_detail t3 ON t3.manage_id = t2.id
GROUP BY
t2.id
HAVING
count( t2.id )>= 1
ORDER BY t2.task_time desc
result 
边栏推荐
- AcWing 1135. 新年好 题解(最短路+搜索)
- KT148A语音芯片ic的硬件设计注意事项
- 中缀表达式转换为后缀表达式(C语言代码+详解)
- Microservice technology - distributed global ID in high concurrency
- Refactoring: improving the design of existing code (Part 2)
- 守望先锋世界观架构 ——(一款好的游戏是怎么来的)
- Typescript 之 快速入门
- Golang concurrent programming goroutine, channel, sync
- 简书自动阅读
- 使用 Cheat Engine 修改 Kingdom Rush 中的金钱、生命、星
猜你喜欢

End-to-End Object Detection with Transformers(DETR)论文阅读与理解

Windows2008R2 安装 PHP7.4.30 必须 LocalSystem 启动应用程序池 不然500错误 FastCGI 进程意外退出
Bubble sort array

Istio部署:快速上手微服务,

rxjs Observable 自定义 Operator 的开发技巧

xml开发方式下AutowiredAnnotationBeanPostProcessor的注册时机

Educational Codeforces Round 129 (Rated for Div. 2) 补题题解

IEDA refactor的用法

Py之interpret:interpret的简介、安装、案例应用之详细攻略

嵌入式(PLD) 系列,EPF10K50RC240-3N 可编程逻辑器件
随机推荐
GMapping代码解析[通俗易懂]
AcWing 1134. Shortest circuit counting problem solution (shortest circuit)
良心总结!Jupyter Notebook 从小白到高手,保姆教程来了!
ShardingSphere-JDBC5.1.2版本关于SELECT LAST_INSERT_ID()本人发现还是存在路由问题
使用 Cheat Engine 修改 Kingdom Rush 中的金钱、生命、星
Zabbix5 client installation and configuration
4274. 后缀表达式-二叉表达式树
《重构:改善既有代码的设计》读书笔记(上)
Correspondence between pytoch version, CUDA version and graphics card driver version
AcWing 1127. 香甜的黄油 题解(最短路—spfa)
股票证券公司排名,有安全保障吗
PXE installation "recommended collection"
[ERP software] what are the dangers of the secondary development of ERP system?
线程应用实例
【ERP软件】ERP体系二次开发有哪些危险?
简书自动阅读
451-memcpy、memmove、memset的实现
checklistbox控件用法总结
AcWing 1137. Select the best line solution (the shortest circuit)
Think about the huge changes caused by variables