Redian新闻
>
请推荐一下合成生物学的资料
avatar
请推荐一下合成生物学的资料# Biology - 生物学
h*n
1
table Orders:
primary key order_id, foreign key customer_id
table Customers:
primary key customer_id, name, address
find out if there's any customer not having any order.
single query, and no nested query allowed.
avatar
b*7
2
本人生物小白。。。
想了解一下合成生物学的研究进展,和产业化前景。请大家推荐点读物,或者渠道。谢
谢谢谢
avatar
b*u
3
select
count*)
from
customers as c
left join orders as o on (c.customerid = o.customerid)
where
o.customerid is null
avatar
s*e
4
select customer_id
from Customers
minus
select distinct customer_id
from Orders
order by customer_id;

【在 h*********n 的大作中提到】
: table Orders:
: primary key order_id, foreign key customer_id
: table Customers:
: primary key customer_id, name, address
: find out if there's any customer not having any order.
: single query, and no nested query allowed.

avatar
h*n
5
您这个还是两次查询啊。

【在 s**********e 的大作中提到】
: select customer_id
: from Customers
: minus
: select distinct customer_id
: from Orders
: order by customer_id;

avatar
h*n
6
这个可以。
再来一个:学生编号,课程,成绩。判断是否有一个学生所有成绩没有F也没有A。每个
学生选的课可能不同。
Records: Id, Course, Grade

【在 b******u 的大作中提到】
: select
: count*)
: from
: customers as c
: left join orders as o on (c.customerid = o.customerid)
: where
: o.customerid is null

avatar
z*h
7
select distinct id from records where grade <> 'f' and grade <>'a'
avatar
h*n
8
这个是至少一门在B和D之间的所有学生。
找的是至少一个学生,所有成绩在B到D之间。

【在 z****h 的大作中提到】
: select distinct id from records where grade <> 'f' and grade <>'a'
avatar
z*h
9
select distinct id from records where grade between 'b' and 'd'
avatar
b*u
10
select
studentid
from
Grade
group by
studentid
having
(
max(case when grade = 'A' then 1 else 0 end ) = 0 and
max(case when grade = 'F' then 1 else 0 end ) = 0
)
avatar
z*h
11
select distinct id from records where id not in (select distinct id from
records where grade = 'a' or grade = 'f')
avatar
g*e
12
分别用not exist和between。效率更高,主要是能否利用index的考虑

【在 z****h 的大作中提到】
: select distinct id from records where id not in (select distinct id from
: records where grade = 'a' or grade = 'f')

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。