SQL高级查询
子查询:在一个SQL语句中嵌套另一个SQL语句 【实例】 --查询商品类别为“图书”的所有商品的id,商品名称以及价格 select id , name ,price from es_product where sort_id = ( select id from es_sort where sortname = '图书'); --查询大于商品平均价格的商品ID 、商品名称以及价格 select id, name, price from es_product where price > (select avg(price) 商品平均价格 from es_product); --查询