`
张玉龙
  • 浏览: 722238 次
  • 性别: Icon_minigender_1
  • 来自: 沈阳
社区版块
存档分类
最新评论

select DISTINCT o.*,g.type_id from es_goods g, es_order o , es_order_items i w

 
阅读更多
select DISTINCT o.*,g.type_id from es_goods g, es_order o , es_order_items i
where  o.disabled=0 and pay_status=1 and g.goods_id=i.goods_id and o.order_id=i.order_id 

#20111130021916
分享到:
评论

相关推荐

    SQLQuery5.sql

    (select num from(select row_number() over(order by s_score desc) as num,s_id from Score where c_id=a.c_id)t where t.s_id=a.s_id)as '排名' from Score a group by a.c_id ,a.s_score, a.s_id )tt where...

    分析MySQL中优化distinct的技巧

    有这样的一个需求:select count(distinct nick) from user_access_xx_xx; 这条sql用于统计用户访问的uv,由于单表的数据量在10G以上,即使在user_access_xx_xx上加上nick的索引, 通过查看执行计划,也为全索引扫描...

    兄弟连数据库第3天课程笔记

    1.内连接: 符合连接条件的数据 被选中 不符合连接条件的数据被过滤掉。 等值连接 ... select distinct m.id,m.first_name from s_emp e,s_emp m where e.manager_id(+)= m.id and e.manager_id is null;

    oracle sql of extracting table structure

    select distinct lower(all_c.table_name) table_name --,(case -- when column_id || to_char(column_id) -- when column_id < 100 then to_char(column_id) -- when column_id > 100 then 'H' || substrb(to...

    优化临时表使用,SQL语句性能提升100倍

     SELECT DISTINCT g.*, cp.name AS cp_name, c.name AS category_name, t.name AS type_name FROMgm_game g LEFT JOIN gm_cp cp ON cp.id = g.cp_id AND cp.deleted = 0 LEFT JOIN gm_category c ON c.id = g....

    php_sql.zip_Known_c php post_json文件转换_php 数组 转 sql

    - SELECT DISTINCT surname FROM personnels ORDER BY surname DESC 插入 ======================== - INSERT INTO myArray (name,surname) VALUES ( Tufan , YILDIRIM ) - INSERT INTO myArray.subitems ( known_...

    使用pyton对OpenStreetMap地图数据进行清洗

    FROM (SELECT uid FROM nodes UNION ALL SELECT uid FROM ways) e; 1051 5.前十位贡献者数量 SELECT e.user, COUNT(*) as num FROM (SELECT user FROM nodes UNION ALL SELECT user FROM ways) e GROUP BY e.user ...

    金蝶BOSV6.1_业务组件API参考手册

    com.kingdee.bos.util.backport.concurrent.locks Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors....

    Oracle-SQL基础到存储过程下载(第二阶段)

    014.sql高级查询_去重distinct.mp4 015.sql高级查询_null操作.mp4 016.sql高级查询_in操作.mp4 017.sql高级查询_between-and操作.mp4 018.sql高级查询_like模糊查询.mp4 019.sql高级查询_集合运算.mp4 020.sql高级...

    达梦数据库常用系统视图及查询语句.pdf

    10、查询表索引状态,便于确认表索引是否可⽤ select I.TABLE_OWNER,I.TABLE_NAME,O.OBJECT_NAME,O.OBJECT_TYPE,O.STATUS FROM USER_INDEXES I,USER_OBJECTS O WHERE O.OBJE CT_NAME=I.INDEX_NAME AND O.STATUS='...

    Oracle事例

    select constraint_name, constraint_type,search_condition, r_constraint_name from user_constraints where table_name = upper(\'&table_name\') select c.constraint_name,c.constraint_type,cc.column_name...

    数据库管理系统检查命令清单.docx

    select resource_name,limit from dba_profiles where profile='DEFAULT' and resource_type='KERNEL'; select username,profile from dba_users; select * from dba_role_privs where granted_role= 'DBA'; select...

    unix练习4-with key

    9. Don’t worry about the test: it’s nothing but... distinct 13. His enthusiasm was really _____, and now all of us are filled with anticipation. a. epidemic b. infective c. effective d. infectious

    使用Distinct查询.rar

    使用Distinct查询.rar使用Distinct查询.rar

    orcale常用命令

    SQL>select index_name,index_type,table_name from user_indexes order by table_name; 查看索引被索引的字段 SQL>select * from user_ind_columns where index_name=upper('&index_name'); 查看索引的大小 ...

    考虑途经武汉修正1

    -- 考虑乘车区间问题SELECT DISTINCT passenger.* FROM trainpass t, taketrainrecord, passen

    sqlserver数据库常用增删改查

    SELECT DISTINCT "栏位名" FROM "表格名" SELECT DISTINCT store_name FROM Store_Information WHERE条件语句 SELECT "栏位名" FROM "表格名" WHERE "条件" SELECT store_name FROM Store_Information WHERE ...

    2008-2009期末sql2005的考试试卷答案

    select distinct Reader.* from Reader,Book,Borrow where PubComp='人民出版社' and Book.BID=Borrow.BID and Borrow.RID=Reader.RID go 4、查询没有借过书的读者信息 use Library select * from Reader,...

    SQL SELECT DISTINCT 语句

    SQL SELECT DISTINCT 语句 SELECT DISTINCT 语句用于返回唯一不同的值。 SQL SELECT DISTINCT 语句 在表中,一个列可能会包含多个重复值,有时您也许希望仅仅列出不同(distinct)的值。 DISTINCT 关键词用于返回...

    sql脚本代码

    Oracle数据库日常检查 select a.tablespace_name tnm,a.... AND A.TABLESPACE_NAME IN (select distinct tablespace_name from dba_tablespaces) and trunc((a.bytes-c.bytes)*100/a.bytes,0) >=80 order by 4 desc;

Global site tag (gtag.js) - Google Analytics