Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
phanicrn
Starting Member
42 Posts |
Posted - 2007-10-05 : 16:03:19
|
| HiOur business logic, 1)we want to find the member who has done cashwithdrawl 2) if he has done caswithdrawal either with debit card or no debit card. for this we r using channel table..column as channel and we have relatioship with fact table.. so firt sql gives mem member_count of caswithdrawal, now i need help in sql, I have another condition, how many members are using debit card. I want the member count.select Saturday_Visits,count(DISTINCT member_key) as member_countfrom EDW.Transaction_Fact_Sales_Service a, EDW.VW_Transaction_Code bwhere a. Transaction_Code_Key = b.Transaction_code_Keyand B.Transaction_Description ='CASH WITHDRAWAL'GROUP BY Saturday_VisitsResultSaturday_visits, Member_count1 - 3 1274611 - 15 25816 - 20 7021 - 25 284 - 5 839Thanks Phani |
|
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2007-10-12 : 00:09:16
|
| Hi PhaniSorry, but its not clear how you can tell whether the transaction was on a card or not, could you post some descriptions of your tables - ie the column names at least and pref the relationships between these.--I'm not schooled in the science of human factors, but I suspect that surprise is not an element of a robust user interface. |
 |
|
|
|
|
|