Re: select items based on 2 columns - Mailing list pgsql-sql

From Frank Streitzig
Subject Re: select items based on 2 columns
Date
Msg-id YvDYIan0yU4IpL+t@frastr-dev
Whole thread Raw
In response to select items based on 2 columns  (Shaozhong SHI <shishaozhong@gmail.com>)
List pgsql-sql
Am Mon, Aug 08, 2022 at 09:24:14AM +0100 schrieb Shaozhong SHI:
> The following is the type of data:
>
> id  id_b   in    out
> 51 57     false false
> 51 42     true   false
> 51   32   false  false
> 51   76   false  true
> 51  49     true   false
>
>
> How to do the following:
>
> select id from tbl   if in is true and out is true are found?

Untested:
select t.id from tbl t where t.in and t.out;

Best regards,
Frank

>
> Regards,
>
> David



pgsql-sql by date:

Previous
From: Shaozhong SHI
Date:
Subject: select items based on 2 columns
Next
From: Pierre Chevalier
Date:
Subject: Re: select items based on 2 columns