Questions tagged as 'count'

1
answer

Count and group by day

SELECT loc.loc_pac as registro, datediff(dd, pac.pac_nasc, getdate()) as 'dias' from loc with (nolock), pac with (nolock), str with (nolock) where loc.loc_pac <> '' and (loc.loc_pac = pac.pac_reg) and (loc.loc_str = str.str_cod) order...
asked by 29.06.2018 / 02:27
1
answer

Count and Display Different Table Registers PHP / MYSQL

GOOD LATE. I'm creating a report to count and display: - the number of men and women (table: customer) who made booking (booking table) in a hotel in a certain period of time (past via form). My question is: How to count and display using Cou...
asked by 28.04.2015 / 17:27
3
answers

2 COUNT within a SELECT with LEFT JOIN

I have two tables: Users: id | nome | email submissions: id | id_envia | id_recebe Every time a user sends a card (which goes by email) to another user, it marks this table, and every time it receives a tag as well. Doubt: I...
asked by 09.03.2016 / 20:52
2
answers

COUNT on multiple tables

I have two tables in my system, and I need to do a two-column count on the tables. I currently do through a VIEW as follows: CREATE VIEW totais AS (SELECT (SELECT COUNT(publications.id) FROM publications) AS total1, (SELECT COUNT(deejays.id) F...
asked by 01.09.2017 / 17:15
1
answer

Error while doing counter via C #

I'm trying to make a pendulum counter to my system, but it's giving error, at the time of calculating, could anyone help me? You are giving error in .Count as you can see in the picture below. MyControllerpublicasyncTask<ActionResult&g...
asked by 27.03.2018 / 15:22
2
answers

MySQL Query - Count different table fields

I need to create a view in MySQL where I get the following result. Col1 | Col2 Total Tab1 | Total Tab2 I'm using UNION as follows, but the result comes as follows: col1 Page 201 Page 5699 CREATE VIEW 'dashboards' AS ( select...
asked by 16.11.2015 / 14:01
1
answer

How to count values of type NULL in MySql

I have a simple table with the answers, in this table I can have answers with value null, 0, 1, 2, 3, ... , but when I count the number of answers with each value those with the value null does not count, / p> Here's an example in...
asked by 04.03.2016 / 20:10
1
answer

Doubt in select with group by and count?

I'm doing SQL in 2 tables in Oracle and would like to group the information according to the job code and also count how many people are in that charge. I'm using the following SQL : select f.numemp, f.numcad, f.nomfu...
asked by 03.05.2017 / 20:55
1
answer

How to count how many fields are empty in the mysql table

I have a land register table with several columns (some of them: id, address, city, proposal, etc.) and would like to count how many fields are empty. For example, the table has a total of 44 columns, if you only have 20 fields filled in, the...
asked by 16.07.2018 / 16:31
1
answer

COUNT on firebase

Hello, Is it possible to do COUNT (record count) in the firebae database? Because I would like to return in my app the total number of occurrences created (TODAS of all users) and total per user, but, I do not know how to do count in the fire...
asked by 14.10.2017 / 15:45