Skip to content
Advertisement

Tag: count

Join count query into one

I have two very simple count queries that I would like to join into one. To clarify the situation I will add the tables I got: Book isbn author 1111 GB 2222 DC 3333 RL Author code Name GB George B. KL Kyle L. DC Donald C. RL Roland L. Coauthor name isbn KL 1111 GB 2222 GB 3333 And

How to do MAX COUNT so Query returns 1 Result SQL

I have the following query: Which returns the following results: Id EmailDomain UserCount 1 @yahoo.com 1 1 @gmail.com 4 2 @hotmail.com 1 3 @aol.com 1 3 @comcast.com 1 I need the Ids and the Email Domains for a later query, but I don’t want multiple email domains. So I want my results to look like this: Id EmailDomain UserCount 1

Trying to get the 2 min(count()) with Ties

I allow myself to write a thread regarding a query I’m trying to make for hours now. I’m trying to get the name of the friend (friend.first_name) who refuses the most proposed dates for events. To do this I’m counting the number of proposed date and ORDER BY ASC. However, this does not take into account TIES. What I’m looking

Count total day difference in a Pivot SQL

I have data in two tables with dates PAL date and HUB date. I’m looking to show the number of day difference in a table with 6 columns: Client 1day 2days 3days 4days 5days Client will display the clients grouped, 1 Day will display the count of how many datediff of 1. 2 Days will display the count of how

Advertisement