当前位置:网站首页>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 
边栏推荐
- Zabbix5 client installation and configuration
- AcWing 1134. 最短路计数 题解(最短路)
- Gamefi chain game system development (NFT chain game development function) NFT chain game system development (gamefi chain game development source code)
- 线程应用实例
- Golang:[]byte to string
- Idea editor removes SQL statement background color SQL statement warning no data sources are configured to run this SQL And SQL dialect is not config
- 2022.7.1-----leetcode. two hundred and forty-one
- AcWing 181. 回转游戏 题解(搜索—IDA*搜索)
- 《架构整洁之道》读书笔记(下)
- Horizontal ultra vires and vertical ultra vires [easy to understand]
猜你喜欢

Refactoring: improving the design of existing code (Part 1)

Registration opportunity of autowiredannotationbeanpostprocessor under annotation development mode

Data dimensionality reduction factor analysis

Build a master-slave mode cluster redis

How to avoid duplicate data in gaobingfa?

安装单机redis详细教程

Registration opportunity of autowiredannotationbeanpostprocessor in XML development mode
Bubble sort array

Reading notes of "the way to clean structure" (Part 2)

定了,就是它!
随机推荐
Function high order curry realization
c语言里怎么设立优先级,细说C语言优先级
Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
How to print mybats log plug-in using XML file
Educational Codeforces Round 129 (Rated for Div. 2) 补题题解
【pytorch学习笔记】Tensor
[pytorch learning notes] tensor
AcWing 1137. Select the best line solution (the shortest circuit)
Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径
《重构:改善既有代码的设计》读书笔记(上)
Golang concurrent programming goroutine, channel, sync
AcWing 1128. 信使 题解(最短路—Floyd)
Gamefi链游系统开发(NFT链游开发功能)丨NFT链游系统开发(Gamefi链游开发源码)
Codeforces Round #802 (Div. 2) 纯补题
VBScript详解(一)
A4988 drive stepper motor "recommended collection"
使用 Cheat Engine 修改 Kingdom Rush 中的金钱、生命、星
MySQL
Refactoring: improving the design of existing code (Part 1)
思考变量引起的巨大变化