关于商城分类查询表结构与数据查询
2017-07-18 10:57
330 查看
select gameid from ( select group_concat(type,"-",v) as final,gameid from (select gameid,type,v from ( select gameid,type, group_concat(value) as v from ( select * from table_name order by gameid asc,type asc,value asc ) as u where (type=1 and value in ('5','8')) or (type=2 and value in ('1')) group by gameid,type ) as tmp ) as t group by gameid ) as f where final='1-5,8,2-1'
相关文章推荐
- 商城项目练习的注意点(数据的获取,hql查询 ,离线查询,分类判断,下拉列表框选中,隐藏字段传递数据等)
- 关于mysql中数据存储复合树形结构,查询时结果按树形结构输出
- SQL2000数据库中树形结构的数据查询
- mysql 查看数据表结构,查询数据表字段名
- SQL 查询树形结构的数据
- Data Structures and algorithm analysis—1.1 What's the book about? (数据结构1.1—关于本书)
- 使用linq 对 DataTable 中的数据进行 查询 与 分类求合
- 关于Python数据结构中字典的心得
- 关于SQL查询效率,100w数据,查询只要1秒
- SQL Server 查询数据库的表结构以及描述来生成数据字典
- 关于mysql处理百万级以上的数据时如何提高其查询速度的方法
- opencv_关于特征点匹配的数据结构
- 关于mysql处理百万级以上的数据时如何提高其查询速度的方法
- 关于labview中事件结构生成报表多次执行时发生数据重叠
- 关于HashSet 集合存储数据的结构(哈希表)
- 关于SQL查询效率,100w数据,查询只要1秒
- php标签云制作——数据表的结构和查询方法
- 在 Oracle Database 11g 第 2 版中查询层次结构数据的快速入门
- 关于Oracle的exp和dblink转移数据效率比较以及DBLINK查询大字段方法