Skip to main content

Questions tagged [count]

COUNT : an aggregate SQL function that is used to count the number of rows.

0 votes
1 answer
77 views

select * from tblA a left join tblB b on b.id = a.bId group by a.bId If I group based on a column, I get only the first record of the records that have same bID value. Is there a way to also ...
Alex's user avatar
  • 179
-1 votes
1 answer
197 views

I need the count of unique values, and am trying to use Oracle's COUNTDISTINCT() function to obtain that: select COUNTDISTINCT(a.m_label) from user_rep a, user_group_rep b, trn_grp_rep c ...
Mikhail T.'s user avatar
2 votes
2 answers
244 views

I have a query where I pull the domain portion from email addresses out of a column and then count how many users from which domain I have. How do I get the total count (all users over all domains) in ...
tink's user avatar
  • 155
0 votes
2 answers
271 views

Problem: How to get passed requirements where there are 4 tables in such relation requirements->links<-test_cases test_cases->results<-result Scenario: Table1 - requirements req_id ...
Łukasz Góra's user avatar
1 vote
1 answer
164 views

I'm trying to extract some statistics from a Postgres database and I made this query: SELECT city, job_count, TO_CHAR(job_count * 100 / SUM(job_count) OVER (), '90D00%') AS job_share FROM ( ...
Mateja Maric's user avatar
2 votes
1 answer
79 views

I'm trying to figure out a way to count an ID once when multiple criteria are met in one column while displaying a total of the same criteria in another column. The criteria for the first column can ...
tkmagnet's user avatar
0 votes
2 answers
97 views

Good Afternoon all, I have two same data record or more in MySql table. How i can counting the same data as one and zero if have only one data based on flag status pair. Below is an example of data: ...
epm.007's user avatar
  • 29
0 votes
1 answer
194 views

I have a public API method that calls a Postgres (14) database and returns a paginated list of rows belonging to a user along with a total count and page index. The count is very costly to perform (...
JackMahoney's user avatar
3 votes
5 answers
3k views

I created two different tables and then decided to put them (=) to each other however, what I am confused about is whether (=) is allowed to be used like that. I tried using IN but I didn't know where ...
sara khalil's user avatar
1 vote
2 answers
517 views

I'm designing a web application where sellers can offer their cars, banks provide various financing offers (e.g. 36 months, 25% downpayment, 25% final payment). Buyers come to this web app and they ...
bdadam's user avatar
  • 111
0 votes
0 answers
67 views

Good Day. I have some data like bellow id name in out 1 lala 2023-09-29 07:00:00 2023-09-29 17:00:00 2 lili 2023-09-29 07:30:00 2023-09-29 16:00:00 1 lala ...
epm.007's user avatar
  • 29
1 vote
1 answer
103 views

Good Afternoon, How i can show all data when using count and where clause in MySql. In my case, I have master data like pict at below. and i using this query to show count the data. SELECT body, ...
epm.007's user avatar
  • 29
1 vote
1 answer
388 views

I have a table of the following structure, where all columns except the last are non-null: ID receiver send_time recv_time 1 A 00:00:00 00:00:01 2 A 00:00:01 NULL 3 A 00:00:02 NULL 4 A 00:00:03 NULL 5 ...
Edgxxar's user avatar
  • 13
0 votes
2 answers
897 views

I have 2 tables, size and cost. My query does a count with a greater than comparison of cost and counts different sizes. table1: size u table2: cred t Here is my query: select u.size as size ,...
tkmagnet's user avatar
2 votes
3 answers
97 views

I have table1 with 2 ID's and 2 values per ID (Y,N). I can count the values by the following query: select id ,count(*) as "total" ,choice from table1 where id in (1,8) group by id, choice ...
tkmagnet's user avatar

15 30 50 per page
1
2 3 4 5
30