Questions tagged [querying]
516 questions
1
vote
1 answer
how to query in flutter cloud firestore with multiple conditions(multiple where clauses)?
widget.filteredRef= FirebaseFirestore.instance
.collection('users')
.doc(widget.uid)
.collection('incomes')
.where('date',isGreaterThanOrEqualTo: startTimeStamp,isLessThanOrEqualTo: endTimeStamp)
…

Vickyees
- 11
- 2
1
vote
1 answer
How can I check whether a specific field has two or more values? Pymongo, MongoDB
I have a question. Some background context: I am querying a database for a specific field whose value is of the type [User]. Where "User" is of type ObjectId(x) for some x. For example:
{ '_id': ObjectId(x)
'field_1: value
'field_2:…

anthonym650
- 49
- 1
- 7
1
vote
1 answer
Query runs on mysql, but fails when put in Query Checker
CREATE TABLE T1(client_id int, Loancount int, PRIMARY KEY (client_id));
INSERT INTO T1(client_id, Loancount)
SELECT DISTINCT C.client_id, count(loan_id) as LoanCount
FROM CLIENT as C, DISP as D, LOAN as L
WHERE (C.client_id=D.client_id) AND…

Pikachu1998
- 37
- 5
1
vote
1 answer
How to get the name of a document in a collection after querying in Firestore?
I am programming an app in Flutter and I want to be able to query a set of documents in a collection in Firestore based on specific criteria and then with the documents that fit said criteria get the name of those documents. This is what I have…

Hudson Kim
- 416
- 6
- 15
1
vote
1 answer
How to write a stabby lambda wrapper scope, that is a composition of other scope names
A simple example for illustration, this is not actually what I'm trying to do:
I have two scopes on a user model:
scope :unarchived, -> { where archived: false }
scope :active, -> { where active: true }
For convenience and dryness, I want a scope…

Ekkstein
- 771
- 11
- 20
1
vote
1 answer
querying for a record and its associations with sequelize
Given a table Show and a table Venue, with the below associations:
Show.belongsTo(Venue, { foreignKey: { name: 'id_venue', allowNull: false } });
Venue.hasMany(Show);
I'm trying to grab one venue and all of its associated shows.
const…

jct
- 69
- 3
- 11
1
vote
1 answer
sparql query if statement with retrieval and variable
My main need is to use something like switch cases in other programming languages.
I have a ?x g1:state (true OR false OR UNDEF) The latest is a variable incoming from a REST API and I want to perform different things based on that value
What I want…

GGEv
- 843
- 9
- 23
1
vote
1 answer
Issue with pandas query for dataframe
Consider the following.
import pandas as pd
d=pd.DataFrame([[1,'a'],[1,'b'],[2,'c'],[2,'a'],[3,'c'],[4,'a'],[4,'c']],columns=['A','B'])
I want those values in A which have EXACTLY 'c' ('c' and only 'c') associated with them. There is only one such…

user17144
- 428
- 3
- 18
1
vote
3 answers
SELECT Only one value per ID - SQL Server
I dont know is this is possible at all, I´m not even sure how to google it.
Im using SQL Server 2014.
Right now I have a SP that outputs a table with data including MovementID, Vehicle, VehicleType and Total of sales.
But it groups all the vehicles…

FcoLG
- 52
- 1
- 9
1
vote
2 answers
Pandas:All results which fulfill multiple Conditions within a Categories
I have 65 K records such as below snippet in my dataframe:
Scrip Timestamp1 NSETS NSEPr Buyq1 Buyq2 Buyq3 Buyq4 Buyq5 Sellq1 Sellq2 Sellq3 Sellq4 Sellq5 Sellp1 Sellp2 Sellp3 Sellp4 Sellp5 buyp1 buyp2 …

Suraj_j
- 151
- 2
- 14
1
vote
1 answer
Search for a record that has a relationship to objects with specific value using Mongoid
Consider the following model diagram representing two models of my Rails project.
The Implement model represents an "object" that a person has, for example a person can have a helmet, bag, shield, etc. As it can be seen in the image, each implement…

ravelinx
- 1,557
- 4
- 18
- 26
1
vote
3 answers
How to query imported json using Mongoose
I've uploaded a json file to MongoDB Atlas cluster (using mongoimport) and now I'm trying to display the data to localhost using express and mongoose.
I've gotten to a point where I can connect to the cluster but I'm struggling in fetching and…

chachacha
- 328
- 1
- 2
- 10
1
vote
3 answers
Querying a Many-to-Many Linking Table
I have a linking table for a many-to-many relationship, with the fields
-
idNote
idTag
I would like to filter for all the tags that are associated with the notes that contain a specified number of tags.
For example, if I select the tags…

user11073489
- 117
- 2
- 8
1
vote
0 answers
GraphDB 8.10 Geosparql geof:nearby how to
I am quite new to sparql and geosparql and I am using GraphDB 8.10 and have already enabled geosparql plugin by executing this in SPARQL interface
PREFIX :
INSERT DATA {
_:s :enabled "true" .
}
I have…

GGEv
- 843
- 9
- 23
1
vote
0 answers
How to define complex shapes in SQL?
I'm working with a flight-trajectory dataset. Containing a lot of longitude and latitude points. I only want to extract, from a large database, the points that are relevant to my analysis, e.g. points withing the Netherlands airspace.
Please see…

JPlanken
- 55
- 1
- 9