Questions tagged [querying]

516 questions
-1
votes
3 answers

How to get the maximum count, and ID from the table SQL

**castID** nm0000116 nm0000116 nm0000116 nm0000116 nm0000116 nm0634240 nm0634240 nm0798899 This is my table (created as a view). Now I want to list the castID which has the most count (in this case which is nm0000116, and how many occurences/count…
user3601148
  • 175
  • 1
  • 9
-2
votes
1 answer

Pymongo - How can I return a specific field?

I need the ObjectId of documents so I can put it in a list. Visually I need '_id':'ObjectId(x)' Out of a bunch of documents. How can I return the Id of a document? Updating the question for clarity. Suppose you have a document: doc1 = {"_id":…
anthonym650
  • 49
  • 1
  • 7
-2
votes
2 answers

How can I query firebase database with text search

In an android app I am making I have implemented a search bar so a user may type in something in hopes of finding it in the database. I have is set up so that the result will come up, but only if it is spelled perfectly and completely. I would like…
dylan
  • 143
  • 1
  • 2
  • 11
-4
votes
1 answer

How to query 3 tables in PSQL?

I am new to databases, I am not sure how to query these 3 tables. I am trying to find out the total deaths(Table COVID - TotalDeathUK) of each strain(Table Strain) for the last 1 year(Table - Time?) Table COVID centerid | patientid | dateid |…
G Ivanov
  • 1
  • 2
-4
votes
3 answers

How to make an "in" statement inclusive-only in SQL

EDITED: Read table_row as table_column (Dudu Markovitz) I have a subset of values that I want to evaluate against a row in SQL. Select count(*) cnt from table_name c where c.table_row in ('value 1','value 2', 'value 3') and other…
Zibbobz
  • 725
  • 1
  • 15
  • 41
1 2 3
34
35