Lazreport distinct count lazarus / 16-Databases ---------------------------------------------------------------------- goodname · 2011-10-14 17:36 Is it possible to have LazReport do a distinct record count for placement in a footer? Using the sum and count aggregate functions work. For now doing a separate TSQLQuery and putting the result in the footer works. ---------------------------------------------------------------------- jesusr · 2011-10-15 16:38 Can you explain what a distinct record count should do and what is the difference with Count aggregate function? ---------------------------------------------------------------------- goodname · 2011-10-15 21:04 Given the following list the count and distinct count will be different. 1,3,7,8,4,2,7,3,4,7 The count is 10. The distinct count is 6 as the numbers 3,7,4 are repeated so only counted once. It is done in SQL by placing DISTINCT inside the aggregate. Code: [Select]SELECT count(id) from tbl; SELECT count(DISTINCT id) from tbl;