Jump to content
  • 0
Sign in to follow this  
cpcbsa

Sql Statement To List Only Distinct Records In Calculated Fields

Question

Hello. I am trying to create a summary report with calculated fields however I am having issues with the report. In the big picture I want to do SQL COUNTS to see if data is in a particular field however I want to group those counts by districts. There are 1202 records and 12 districts. I can not make a summary report that calculates totals for the 12 districts. I am learning as I go but I am trying something new... In one of the calculated fields (at this point I tried a new report with only this calculated field to see if I could get 12 DISTINCT records) I am trying to do a SQL DISTINCT command that only pulls the 12 DISTINCT names from the District column in the table. I am not sure if I am missing something in caspio to make this work... here is what I have:

 

SELECT DISTINCT [@field:District] FROM tbl_Charter_Base

 

when I do this in caspio it pulls every record in the 'District' column to total 1202 records instead of pulling only the DISTINCT records (12) 

 

any ideas? Not sure what I am missing... THANKS for YOUR HELP!

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...