Where、order by、group by、join、distinct union 后面的字段最好加上索引 ...
分类:
数据库 时间:
2020-06-14 20:45:31
阅读次数:
75
->select查询详解*********** select distinct\top ... --(5)投影 from -- (1)找到表 where -- (2)过滤掉我们不需要的数据 group by --(3)分组操作 having --(4)对分组后的数据进行过滤。 order by -- ...
分类:
其他好文 时间:
2020-06-14 18:55:57
阅读次数:
57
1. mybatis中xml文件特殊字符例如“<”,“>”转义解决方式: ①使用 < 和 >来转义 ②使用标签<![CDATA[ <或> ]]> 2. Redis的部署方式,使用的jar包 3. Zookeeper的选举机制 4. SQL语句的执行顺序(由sql中的别名的使用位置引申出) ...
分类:
其他好文 时间:
2020-06-14 18:52:56
阅读次数:
65
//首先linq是不支持DateTime.DateDiff的,会报错,可以用SqlFunctions.DateDiff代替,与sql语法一样 //示例如下 获取当天登录过的用户列表 var gameList = this.dbUsers.Where(t => SqlFunctions.DateDif ...
分类:
其他好文 时间:
2020-06-14 18:34:23
阅读次数:
48
查找重复的电子邮箱 sql 编程 1. 地址 https://leetcode-cn.com/problems/duplicate-emails/ 2. 解法 内连接,或者多表查询 email 相同,但是 id 不同的行 select distinct p1.Email from Person p1 ...
分类:
其他好文 时间:
2020-06-14 15:12:25
阅读次数:
86
从不订购的客户 sql 编程 1. 地址 https://leetcode-cn.com/problems/customers-who-never-order/ 2. 解法 子查询 select Name as Customers from Customers where Id not in ( s ...
分类:
其他好文 时间:
2020-06-14 14:29:06
阅读次数:
76
今日内容概要 如何查询表 """ select where group by having distinct order by limit regexp like ... """ 连表操作理论 今日内容详细 前期表准备 create table emp( id int not null unique ...
分类:
数据库 时间:
2020-06-14 12:46:59
阅读次数:
58
1.数据清洗 步骤: 1.查询charge_record表业务类型为充值且订单状态为成功的数据 2.将上述数据转移到本地数据库 使用如下脚本: # coding=utf-8import pymysql# 原数据库链接db1 = pymysql.connect( host='***', port=33 ...
分类:
数据库 时间:
2020-06-12 19:54:51
阅读次数:
89
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using Utilities; us ...
HIVE count(distinct ) over() 无法使用解决办法 在使用hive时发现count(distinct ) over() 报错 hive> with da as ( > select 1 a, 'a' b union all > select 1 a, 'a' b union ...
分类:
其他好文 时间:
2020-06-11 14:58:24
阅读次数:
200