Redian新闻
>
沙沙地问:哪儿能下载一些EE方面的书啊?
avatar
沙沙地问:哪儿能下载一些EE方面的书啊?# EE - 电子工程
k*1
1
Looking for a kind-hearted and trust-worthy female student and/or healthcare
professional to help to discharge me from a Boston hospital. The person
will need to pick me up at the hospital and send me back to hotel, which is
10mins away from the hospital and my scheduled surgery is May 25th.
Please contact me if you are interested in this task. Total estimated time
is prob 30mins maximum.
For interested party, please call 650-814-3792 or text me.
Thanks!
P.S. - I will be in Boston on May 11th, would like to meet you in person
beforehand. Thx.
avatar
t*u
2
Income(code, point, date, inc)
Outcome(code, point, date, out)
Under the assumption that the income (inc) and expenses (out) of the money a
t each outlet (point) are registered any number of times a day, get a result
set with fields: outlet, date, expense, income.
怎么弄?
想到用
(
Select A.Point, A.date, A.inc, B.out
from Income A LEFT JOIN Outcome B ON A.point = B.point AND A.date= B.date
UNION
Select B.point, B.Date,A.inc,B.out
from Income A RIGHT JOIN Outcome B ON A.point = B.point AND A.date= B.date
)
然后再group求sum
好像不对
avatar
n*e
3
请问你们都从哪些网站,用哪些工具下啊?有些书太贵了。
avatar
k*z
4
直接一个outter join 就可以了。不用这么麻烦
select a.*,b.*
from a outter join b
that is it. rename them accordingly.
avatar
g*u
5
我当年穷的时候是图书馆借来,然后去打印店印的,辛苦点但一本书也就10几20块。
有时emule上也能下几本。
avatar
i*d
6
先aggregate each table,再full Outer Join。

a
result

【在 t*********u 的大作中提到】
: Income(code, point, date, inc)
: Outcome(code, point, date, out)
: Under the assumption that the income (inc) and expenses (out) of the money a
: t each outlet (point) are registered any number of times a day, get a result
: set with fields: outlet, date, expense, income.
: 怎么弄?
: 想到用
: (
: Select A.Point, A.date, A.inc, B.out
: from Income A LEFT JOIN Outcome B ON A.point = B.point AND A.date= B.date

avatar
t*u
8
谢谢
还有一个问题
用下面的code 可以基本弄出来
但是出来的表格里面
1. 有两个 point 和 date 怎么remove
2. 因为有些(point,date)对应的继续不是income和outcome 都有,
full join 后 ,怎么根据(point,date)合并啊?
主要问题还是有两个date,两个 point的列
select *
FROM
(select point,date,sum(inc) AS income
from Income
group by point,date
) A
FULL OUTER JOIN
(select point,date,sum(out) AS Outcome
from Outcome
group by point,date
) B
ON A.point = B.point AND A.date=B.date

【在 i*******d 的大作中提到】
: 先aggregate each table,再full Outer Join。
:
: a
: result

avatar
n*e
9
多谢指点啊!!
avatar
k*z
10
A.x, a.y, b.x as x1, b.y as y1
不要不屑。
avatar
t*u
12
关键是combin
例如 A 和B 里面都有date
但是A的date 可能有B的date不能包含的
怎么combine成一个date

【在 k*z 的大作中提到】
: A.x, a.y, b.x as x1, b.y as y1
: 不要不屑。

avatar
s*r
13
google XXX(books'name) PDF.....
avatar
i*d
14
TRY:
select coalesce(ap,bp) AS point, coalesce(ad,bd) as date, income, outcome
from
(
select *
FROM
(select point AS ap,date AS ad, sum(inc) AS income
from Income
group by point,date
) A
FULL OUTER JOIN
(select point AS bp,date AS bd, sum(out) AS Outcome
from Outcome
group by point,date
) B
ON A.point = B.point AND A.date=B.date
) AB

【在 t*********u 的大作中提到】
: 谢谢
: 还有一个问题
: 用下面的code 可以基本弄出来
: 但是出来的表格里面
: 1. 有两个 point 和 date 怎么remove
: 2. 因为有些(point,date)对应的继续不是income和outcome 都有,
: full join 后 ,怎么根据(point,date)合并啊?
: 主要问题还是有两个date,两个 point的列
: select *
: FROM

avatar
e*e
15
www.netyi.net,
emule search
avatar
t*u
16
1 .select coalesce(ap,bp) AS point, coalesce(ad,bd) as date, income, outcome
过不了
2。
Select*
FROM
(select point AS ap,date AS ad, sum(inc) AS income
from Income
group by point,date) A
FULL OUTER JOIN
(select point AS bp,date AS bd, sum(out) AS Outcome
from Outcome
group by point,date) B
ON A.ad = B.bd AND A.ap=B.bp
的结果和 正确的结果 我截图了

【在 i*******d 的大作中提到】
: TRY:
: select coalesce(ap,bp) AS point, coalesce(ad,bd) as date, income, outcome
: from
: (
: select *
: FROM
: (select point AS ap,date AS ad, sum(inc) AS income
: from Income
: group by point,date
: ) A

avatar
i*d
17
为什么过不了?what is the error msg?
run the whole script,not just
“select coalesce(ap,bp) AS point, coalesce(ad,bd) as date, income, outcome ”

outcome

【在 t*********u 的大作中提到】
: 1 .select coalesce(ap,bp) AS point, coalesce(ad,bd) as date, income, outcome
: 过不了
: 2。
: Select*
: FROM
: (select point AS ap,date AS ad, sum(inc) AS income
: from Income
: group by point,date) A
: FULL OUTER JOIN
: (select point AS bp,date AS bd, sum(out) AS Outcome

avatar
t*u
18
好了 谢谢
估计是,的转码问题
我用的是一个在线学习的网站
PS
最后一句应该是
ON A.ad = B.bd AND A.ap=B.bp
不能用
ON A.date = B.date AND A.point=B.point

outcome ”

【在 i*******d 的大作中提到】
: 为什么过不了?what is the error msg?
: run the whole script,not just
: “select coalesce(ap,bp) AS point, coalesce(ad,bd) as date, income, outcome ”
:
: outcome

avatar
i*d
19
YES。

【在 t*********u 的大作中提到】
: 好了 谢谢
: 估计是,的转码问题
: 我用的是一个在线学习的网站
: PS
: 最后一句应该是
: ON A.ad = B.bd AND A.ap=B.bp
: 不能用
: ON A.date = B.date AND A.point=B.point
:
: outcome ”

avatar
t*u
20
再问一个
像这样用某个同名的字段进行join的操作
例如 a(name, id)
b(rank, name)
最简单情况 假设 FULL JOIN 和 INNER JOIN都是一个效果
join后有没有直接方法 产生一个view是 name,id,rank的?
而不是用rename,然后再select的方法
谢谢

【在 i*******d 的大作中提到】
: YES。
avatar
B*g
21
你开始学sql?

【在 t*********u 的大作中提到】
: 再问一个
: 像这样用某个同名的字段进行join的操作
: 例如 a(name, id)
: b(rank, name)
: 最简单情况 假设 FULL JOIN 和 INNER JOIN都是一个效果
: join后有没有直接方法 产生一个view是 name,id,rank的?
: 而不是用rename,然后再select的方法
: 谢谢

avatar
t*u
22

找不到工作
上次面试不会sql 就跪了

【在 B*****g 的大作中提到】
: 你开始学sql?
avatar
i*d
23
如果一个效果的话,就用inner join。
同样name的column就完全一样,出现一次就可以了。

【在 t*********u 的大作中提到】
: 再问一个
: 像这样用某个同名的字段进行join的操作
: 例如 a(name, id)
: b(rank, name)
: 最简单情况 假设 FULL JOIN 和 INNER JOIN都是一个效果
: join后有没有直接方法 产生一个view是 name,id,rank的?
: 而不是用rename,然后再select的方法
: 谢谢

avatar
t*u
24
如果不一样呢
例如非得用LEFT OUTER JOIN 呢?

【在 i*******d 的大作中提到】
: 如果一个效果的话,就用inner join。
: 同样name的column就完全一样,出现一次就可以了。

avatar
i*d
25
left outer join 不需要输出右边table被join 的 column吧。

【在 t*********u 的大作中提到】
: 如果不一样呢
: 例如非得用LEFT OUTER JOIN 呢?

avatar
t*u
26
我用inner join 测试了一下
出来的结果有两个date 和 point
PS 那个网站的后台的是MS SQL SERver

【在 i*******d 的大作中提到】
: left outer join 不需要输出右边table被join 的 column吧。
avatar
c*d
27
怎么神医们都改行作码工了
avatar
t*u
28
神医难做
马公好当

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