pname dis%
a 10
b 10
c 15
Count 10% 0r 15 %
Like greater than 10% or 15%
dis% count
10% 3
15% 1
10% is 3 count because it exists and satisfy a,b,c all item and 15 % only 1
Hi SajidHussa,
Please refer below Query.
SELECT DISTINCT [dis%], (SELECT COUNT([dis%]) FROM Discount d1 WHERE d1.[dis%] >= d.[dis%]) as [Count] from Discount d
Screenshot
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.