Table1:
id name | design | AddrId
1 Ram SE 101
2 Ravi JSE 102
3 Vas SSE 103
Table2:
AddrId | MobNo | EmailId
101 78945 a@gmail
101 54675 b@gmail
102 12345 c@gmail
103 45687 d@gmail
103 64587 d@gmail
output
AddrId | MobNo | EmailId
101 54675 b@gmail
102 12345 c@gmail
103 64587 d@gmail
There are no details, so here a general response:
SELECT DISTINCT col1, col2, col3 FROM table [WHERE a = 123] ;
SELECT col1, col2, col3 FROM table [WHERE a = 123] GROUP BY col1[, col2] ;
You can use MIN
aggregate function with GROUP BY
.
Query
select `AddrId`,
min(`MobNo`) as `MobNo`,
min(`EmailId`) as `EmailId`
from `your_table_name`
group by `AddrId`;
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
How to upload single and multiple images in server folder using springi tried with below code but its not working
I am asking this question as general purposeI wanted to know how searching a database works, suppose I have a certain tag or word with me and I want to get all the rows in which that tag is present and the database is MySQL