YAN HONG YE wrote:
> I have a 2 table:
> 1. tb1:
>
> aa bb cc mdate
> 1 d1 2.5 2012-08-07
> 2 d2 3.3 2012-08-07
> 3 d1 6.4 2012-08-09
>
> 2. tb2:
> aa bb cc
> 1. d1 5.3
> 2. d2 7.6
>
> mysql sql cmd is:
>
> select tb2.bb,tb2.cc,(max(tb1.mdate)-min(tb1.mdate)) as mmd,(mmd.
> max(tb
"Igor Tandetnik" reply:
YAN HONG YE wrote:
> mysql sql cmd is:
>
> select tb2.bb,tb2.cc,(max(tb1.mdate)-min(tb1.mdate)) as mmd,(mmd.
> max(tb1.mdate).cc-mmd. min(tb1.mdate).cc) as mmc from tb1,tb2
> where tb2.bb in (select bb from tb1 where bb group by bb having count(bb)) ;
With all due res
YAN HONG YE wrote:
> mysql sql cmd is:
>
> select tb2.bb,tb2.cc,(max(tb1.mdate)-min(tb1.mdate)) as mmd,(mmd.
> max(tb1.mdate).cc-mmd. min(tb1.mdate).cc) as mmc from tb1,tb2
> where tb2.bb in (select bb from tb1 where bb group by bb having count(bb)) ;
With all due respect, this query doesn't m
I have a 2 table:
1. tb1:
aa bb cc mdate
1 d1 2.5 2012-08-07
2 d2 3.3 2012-08-07
3 d1 6.4 2012-08-09
2. tb2:
aa bb cc
1. d1 5.3
2. d2 7.6
mysql sql cmd is:
select tb2.bb,tb2.cc,(max(tb1.mdate)-min(tb1.mdate)) as mmd,(mmd.
max(tb1.mdate).cc-mmd. min(tb1.mdate).cc) as mmc from tb1,
4 matches
Mail list logo