On 10/29/2014 5:42 PM, Baruch Burstein wrote:
SELECT max(a), b FROM t WHERE a<50;
Is there some way to filter *after* this is applied?
Wrap it in another select:
select * from (
SELECT max(a) maxa, b FROM t WHERE a<50
)
where b is not null;
--
Igor Tandetnik
On Wed, Oct 29, 2014 at 8:43 PM, Richard Hipp wrote:
> > If I have a table, "t", with 2 columns, "a" and "b". Assuming that "a"
> is a
> > unique number, will the following query always return the whole row (that
> > is, with the correct "b" column) where "a" is the highest
On Wed, 29 Oct 2014 20:38:07 +0200
Baruch Burstein wrote:
> If I have a table, "t", with 2 columns, "a" and "b". Assuming that
> "a" is a unique number, will the following query always return the
> whole row (that is, with the correct "b" column) where "a" is the
> highest
On Wed, Oct 29, 2014 at 4:28 PM, Staffan Tylen
wrote:
> But if several rows have the same a value as the max value then the b value
> will be arbitrary, or?
>
Then b will be from one of the rows for which a is maximal - but you don't
know which one.
Similarly, if you
But if several rows have the same a value as the max value then the b value
will be arbitrary, or?
Staffan
On Wed, Oct 29, 2014 at 7:43 PM, Richard Hipp wrote:
> On Wed, Oct 29, 2014 at 2:38 PM, Baruch Burstein
> wrote:
>
> > Hi,
> >
> > If I have a
On Wed, Oct 29, 2014 at 2:38 PM, Baruch Burstein
wrote:
> Hi,
>
> If I have a table, "t", with 2 columns, "a" and "b". Assuming that "a" is a
> unique number, will the following query always return the whole row (that
> is, with the correct "b" column) where "a" is the
Hi,
If I have a table, "t", with 2 columns, "a" and "b". Assuming that "a" is a
unique number, will the following query always return the whole row (that
is, with the correct "b" column) where "a" is the highest number below 50?
SELECT max(a), b FROM t WHERE a<50;
--
˙uʍop-ǝpısdn sı ɹoʇıuoɯ
7 matches
Mail list logo