How can i count a specific ward in a table in database sql. Example, i have a table and i want to count how many times repeated ward "hello", can you help me please)
Asked
Active
Viewed 77 times
0
-
How does your table look? I'd be able to provide you with a functioning query if I have a rough idea how the table looks. – Thoby Apr 19 '17 at 13:07
-
@Thoby you can help me with any example) – anasalim28 Apr 19 '17 at 13:14
3 Answers
0
Lets say you have a target table ie tbl_test
with a column i.e my_column
, the query would look like this
SELECT COUNT(*) FROM tbl_test WHERE my_column = 'hello';

Abel Masila
- 736
- 2
- 7
- 25
-
-
For Ms Sql sever ,try this: [link](http://thesitedoctor.co.uk/blog/search-every-table-and-field-in-a-sql-server-database-updated). – Abel Masila Apr 19 '17 at 13:24
0
If I understand your question it should look like this:
SELECT COUNT(Word), Country
FROM Customers
WHERE Word='hello'
GROUP BY Country;

NoOorZ24
- 2,914
- 1
- 14
- 33
-
If you posted how your table looks I could write an example with your variables – NoOorZ24 Apr 19 '17 at 13:13
-
0
You can try select count(nameOfTheFieldWhenCanAppearHello)from table where nameOfTheFieldWhenCanAppearHello='Hello' group by nameOfTheFieldWhenCanAppearHello

Carolina Gil
- 1
- 1