1. 经销商 按店铺交易量汇总 ) from bp_shop_info i left join ( select t.shop_id,sum(t.shop_cost) as summary from bp_platform_order t where t.request_time >= to_date('2014-**','yyyy-mm') and t.request_time < to_date('2014-**','yyyy-mm') ,) group by t.shop_id) p o…
Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day from table_name"; //int 时间戳类型 $sql = "select from_unixtime(create_time, '%Y-%m-%d') as day from table_name"; //一个sql返回多个总数 $sql = "select…
Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day from table_name"; //int 时间戳类型 $sql = "select from_unixtime(create_time, '%Y-%m-%d') as day from table_name"; //一个sql返回多个总数 $sql = "select…