I have a database structure like this:
Ans Qid
Null 1
8 1
Null 1
Null 1
I want to find only non null value 8 based on qid,rather than both null and non null value on bais of qid.
i.e my output shouid be like this:
Ans Qid
8 1
Please suggest me some sql server query to achieve this

Puneet KankarRank #446 · 5.6K reputationPosted Jul 18, 2017, 10:33 PM EDT
Ibrahim SiddiqueRank #1,837 · 807 reputationPosted Jul 18, 2017, 10:34 PM EDT
priyankaRank #7,741 · 235 reputationPosted Jul 19, 2017, 1:03 AM EDT
Ibrahim SiddiqueRank #1,837 · 807 reputationPosted Jul 19, 2017, 1:42 AM EDT
priyankaRank #7,741 · 235 reputationPosted Jul 19, 2017, 1:52 AM EDT