Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Advice
1 vote
4 replies
195 views

In SQL Server, I have table myTable with fields patientID, orderID, and orderDesc. patients can have multiple orders with individually variable descriptions. I’m requested to write a query to select ...
Score of 0
0 answers
72 views

I have a dataset with dates and hours and a count of the number of events within each hour. I want a measure to take the minimum value of the count within each hour. So the min count by hour column ...
Score of -4
3 answers
192 views

I'm searching for duplicate values per column and need a count of them and data from some additional columns. Table sample BillNr Name email 1000 Shakira [email protected] 1001 Shakira [email protected] ...
Score of -2
3 answers
151 views

I have a list my_list = [3,8,11,8,3,2,1,2,3,3,2] # my list max(my_list, key=my_list.count) # most frequent number appeared on the list But i want to make a list according to the most frequent ...
Score of 1
4 answers
270 views

I have a table that has values for each week in each column. I want to count the number of consistent values starting from the first week until it changes. I've tried searching for answers but I ...
Score of 0
1 answer
86 views

I have a COUNT(*) query that is really fast in several DB's, but is really slow on MySQL AURORA: I can't seem to figure out why. First I thought it was because it went the MEMORY went over the 4MB, ...
Score of 2
2 answers
123 views

I need to count the number of students who were registered in a given course over an academic year. The following SELECT query returns a column of course numbers and a column of the academic year. ...
Score of 3
3 answers
194 views

My stored procedure has this structure: if Count 1>0 then count 2 with (condition 1,) if Count 2>0 then count 3 with (condition 1,2) if Count 3>0 then count 4 with(condition ...
Score of 0
0 answers
76 views

In databases such as PostgreSQL, doing exact counts like select count (*) from table where condition perform a full table scan. PostgreSQL will need to scan either the entire table or the entirety of ...
Score of 2
3 answers
159 views

My current project/issue is we have a list of permit types. With these types they are needing to be grouped by an overall category. Once grouped out the end goal is to count how many within specified ...
Score of 0
2 answers
138 views

I have a number represented as a large binary string (length can be up to 1 million bits). The number is recursively split as follows: At each step, divide the number x into two parts: floor(x/2) and ...
Score of 1
1 answer
147 views

I am trying to get a cell in excel to display a total count of emails in a given subfolder from a specific outlook account (which is a shared mailbox). Two questions: How to specify which Outlook ...
Score of 0
0 answers
78 views

I´ve got a large dataframe that I´ve got to aggregate and then show counts by geo, the lines should be unique by product, sex and education… already use dplyr to group by and then count but only get ...
Score of -1
2 answers
80 views

I have a small list of employees, and how much units they finished a given day. But I have duplicate values, because they have to place multiple components. List looks something like this: Employee ...
Score of 0
0 answers
21 views

I have table with tinyint and I want to count positive and negative values. I tried the following example (simplified) but the results are wrong. There are 4 (1) in table so I expect like_count to be ...

15 30 50 per page
1
2 3 4 5
1449