Access SQL how to make an increment in SELECT query. So in your example, count is the derived sequence number I dont see what pattern is used to determine the count must be 1 for id1. If id contained unique values, and you order by id you could have this count id section. Boyan Penev on Microsoft BI. Odbc Microsoft Access Setup Buffer Size For Logging on this page. A practical blog about Microsoft BI tools, techniques and practices written by a developer for other fellow developers. CodeGuru is where developers can come to share ideas, articles, questions, answers, tips, tricks, comments, downloads, and so much more related to programming in. Looks to me like mike. Ys DSum approach could work. Or you could use a different approach to a ranking query as Allen Browne described at this page. Edit You could use DCount instead of DSum. I dont know how the speed would compare between the two, but DCount avoids creating a field in the table simply to store a 1 for each row. DCount,Your. Table. Name,idlt id AS counter. Whether you go with DCount or DSum, the counter values can include duplicates if the id values are not unique. If id is a primary key, no worries.