当前位置:网站首页>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 
边栏推荐
- 数据湖(十二):Spark3.1.2与Iceberg0.12.1整合
- 职场四象限法则:时间管理四象限与职场沟通四象限「建议收藏」
- Educational Codeforces Round 129 (Rated for Div. 2) 补题题解
- 移动机器人路径规划:人工势场法[通俗易懂]
- AcWing 1135. 新年好 题解(最短路+搜索)
- Mobile robot path planning: artificial potential field method [easy to understand]
- Cuckoo filter
- AcWing 1127. 香甜的黄油 题解(最短路—spfa)
- rxjs Observable 自定义 Operator 的开发技巧
- mysql函数
猜你喜欢

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

《架构整洁之道》读书笔记(下)

定了,就是它!

KT148A语音芯片ic的硬件设计注意事项

IDEA编辑器去掉sql语句背景颜色SQL语句警告No data sources are configured to run this SQL...和SQL Dialect is Not Config

Introduction to program ape (XII) -- data storage

Chic Lang: completely solve the problem of markdown pictures - no need to upload pictures - no need to network - there is no lack of pictures forwarded to others

Registration opportunity of autowiredannotationbeanpostprocessor under annotation development mode
Bubble sort array

Set up sentinel mode. Reids and redis leave the sentinel cluster from the node
随机推荐
AcWing 1127. 香甜的黄油 题解(最短路—spfa)
Py之interpret:interpret的简介、安装、案例应用之详细攻略
Npoi export Excel2007
JS如何取整数
4274. 后缀表达式-二叉表达式树
Understanding and function of polymorphism
Virtual machine initialization script, virtual machine mutual secret key free
zabbix5客户端安装和配置
Function high order curry realization
Memory management of C
Digital scroll strip animation
C file input operation
Chapter 7 - class foundation
Pytorch版本、CUDA版本与显卡驱动版本的对应关系
451-memcpy、memmove、memset的实现
453-atoi函数的实现
Think about the huge changes caused by variables
How to avoid duplicate data in gaobingfa?
AcWing 340. 通信线路 题解(二分+双端队列BFS求最短路)
IEDA refactor的用法