随笔分类 -  SQL语句 数据库

SQL 语句的基本使用,以及一些高级技巧
mysql 数据库的最新操作
摘要:mysql 数据库最新操作如下 一、数据库的操作 语法:CREATE DATABASE [IF NOT EXISTS] db_name [create_specification [, create_specification] ...] create_specification: [DEFAULT 阅读全文

posted @ 2024-01-03 22:59 星河赵 阅读(20) 评论(0) 推荐(0)

flask mysql sqlalchemy教程
摘要:1.建立models_base文件 连接数据库 import logging import ast import simplejson as json import time from flask_sqlalchemy import SQLAlchemy from flask import Flas 阅读全文

posted @ 2020-03-23 14:29 星河赵 阅读(1703) 评论(0) 推荐(0)

sql ODPS常用例子
摘要:1.新手漏斗 SELECT a.pt as 日期, count(DISTINCT a.device_id) as 新增激活用户, round(sum(g1)/count(DISTINCT a.device_id), 3) as 成功进入游戏曝光, round(sum(if(game_level>=1 阅读全文

posted @ 2020-03-10 19:19 星河赵 阅读(2652) 评论(0) 推荐(0)

SQL 常用方法例子
摘要:SQL left join 例子 with a as( SELECT * from workspace_saiyisai.odps_base_sdkh_mid_roi WHERE pt = '${s1}' ), b as( select _id,device_id,pt FROM sync_mong 阅读全文

posted @ 2020-01-11 10:55 星河赵 阅读(969) 评论(0) 推荐(0)

SQL 常用方法函数
摘要:sql 常用函数方法 阅读全文

posted @ 2019-12-30 16:52 星河赵 阅读(678) 评论(0) 推荐(0)

Python 连接数据库 mysql
摘要:python 连接 数据库 阅读全文

posted @ 2018-05-13 00:01 星河赵 阅读(225) 评论(0) 推荐(0)

sql 基础练习 计算7天各个时间点的总和 group by order mysql一次查询多个表
摘要:SQL 基础练习 mysql 计算7天各个时间点的总和 例如 20180911 - 20180913 的总的impression click cost 和数 count(*):所有行进行统计,包括NULL行 (记得这个性能差些,不建议使用)count(1):所有行进行统计,包括NULL行count( 阅读全文

posted @ 2018-05-12 23:59 星河赵 阅读(570) 评论(0) 推荐(0)

sql 数据查询
摘要:1.数据查询 阅读全文

posted @ 2018-05-09 18:37 星河赵 阅读(235) 评论(0) 推荐(0)

Mac 命令行安装mysql homebrew 安装mysql后,如何配置mysql
摘要:非常好 强力推荐 这个是我最新并且一直推崇的方法:1、安装:sunyichaodeMacBook-Pro:~ sunyichao$ brew install mysql2、开启mysql:mysql.server start2、使用mysql的配置脚本:/usr/local/opt/mysql/bi 阅读全文

posted @ 2018-03-29 18:59 星河赵 阅读(374) 评论(0) 推荐(0)

SQL语句的一些基本使用以及一些技巧
摘要:#SELECT 列名1, 列名2, from 表明 #SELECT id,title,content,type from news 效率相对较高#SELECT * from news *代表所有字段,效率相对较低#SELECT * from news where id = 1 查询出id=1#SEL 阅读全文

posted @ 2017-01-18 16:01 星河赵 阅读(390) 评论(0) 推荐(0)

导航