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 |
davidfusebox
Starting Member
1 Post |
Posted - 2014-03-10 : 04:31:49
|
I have 4 tables that i need to join to return results for an sms gateway. The columns that i need to be output are tblmembers.name and tblmembers.number.I need to be able to change the following conditions according to my application but the structure should stay the same on the query, the columns that i need to be able to filter by are: tblmembers.sms, tblmembers.country_zone_id, tblmembers.country_id, tblmembers.birthdate (between x any y), tblmembers.gender, tblmembers.campid, tblmembers.poe, the second table is tblmembertiers.status (this needs to be the newest entry), the third table is accounttrans.amount (i need to be able to calculate average earn/redeem and even select the top x members), accounttrans.mercantid(need to return members who have been to a store x or more times. the last table is accounts.balance (need to be able to return members with an average balance of x)So basically i need a query where i can sqecify all the values for the given columns and have the valid results returned.Thanks for the help! |
|
|
|
|