Alfredomulet
MIS
Hello everyone, I'm having this discussion with a fellow data modeler regarding the use of COUNT vs. SUM. I'm used to build the DAILY_TRANSACTIONS_FACT with a unique TXN_ID column whose values are just consecutive numbers. When calculating number of transactions, I just do COUNT(TXN_ID).
My colleage on the other hand, build them with a TXN_COUNT, rather than the ID, whose value is allways 1. Then, the calculation is SUM(TXN_COUNT).
What are the advantages disadvantages of each approach??
Thanks!
alfredo
My colleage on the other hand, build them with a TXN_COUNT, rather than the ID, whose value is allways 1. Then, the calculation is SUM(TXN_COUNT).
What are the advantages disadvantages of each approach??
Thanks!
alfredo