Jump to content

weazy

Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

weazy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am trying to count several columns if their values match a specific parameter e.g. select count(s1q1), count(s1q2), count(s1q3) ... FROM tablename WHERE s1q1 = 4 or s1q2 = 4 or s1q3 = 4 or .... so if s1q1 has 10 entries that are a 4 and 6 entries that are other numbers I would expect to see a 10 same goes for the rest of the columns. however, I am not getting that kind of response I am getting wildly incorrect counts. Does anyone know the best way to do this? I have about 25 columns to count so I dont want to do a query for each column. in short, what I am after here is to find out how many times s1q1 = 4, how many times s1q2 = 4, so on and so forth without running multiple queries thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.