Mysql query to fetch data

Posted by hnihar on Stack Overflow See other posts from Stack Overflow or by hnihar
Published on 2010-06-07T07:25:13Z Indexed on 2010/06/07 7:32 UTC
Read the original article Hit count: 172

Filed under:
|

i have a table "request" with 4 columns namely:

1.recId :long primary key
2.interactionId:long
3.requestedBy:boolean
4.requestedType:boolean

and data is as follows: VALUES

(185,455699,0,5),
(186,455746,0,1),
(187,455746,1,1),
(188,455752,0,1),
(189,455753,0,1),
(190,455753,1,1),
(191,455754,1,1)

i want a query to fetch all the rows where interactionId is same and having requestedBy both 1 and 0 values and requestType=1;

regards, Nihar

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql