Questions tagged [querying]
516 questions
2
votes
1 answer
neo4j - find nodes with strong relationship
I have in my graph places and persons as labels, and a relationship "knows_the_place". Like:
(person)-[knows_the_place]->(place)
A person usually knows multiple places.
Now I want to find the persons with a "strong" relationship via the places…

dynobo
- 675
- 1
- 6
- 15
2
votes
3 answers
PhP (Codeigniter) Merging query results before foreach loop
I would like know if it is possible to merge sql queries like the following from codeigniters active record.
//get assigned contacts
$this->db->select('*, CONCAT(first_name, " " ,last_name) AS name', FALSE);
…

skribe
- 3,595
- 4
- 25
- 36
2
votes
2 answers
Effective way of doing http queries to a server on Java
I'm working on a software that does extensive queries to a database which is has a http interface. So my program parses and handles queries that are in form of long http:// addresses..
I have realized that the bottleneck of this whole system is the…

posdef
- 6,498
- 11
- 46
- 94
2
votes
3 answers
ParseQuery gives 0 objects when querying from local datastore even after successfully pinning
I am using the Android SDK of parse.com and have arrived at a peculiar problem.
From a fragment's onCreate:
Fetch an object from the server.
Pin it.
Fetch an object from the local datastore.
Here is a snippet of the code from the…

reubenjohn
- 1,351
- 1
- 18
- 43
2
votes
1 answer
Conditional summing (Alasql)
I've recently discovered Alasql, which is already saving me tons of work with data manipulation.
Now I'm trying to aggregate yearly revenues for each customer. I've tried partition by with no success, and I've tried this conditional approach, but it…

Cos
- 1,649
- 1
- 27
- 50
2
votes
1 answer
Querying Google Images
I am currently writing a program that needs to be able to query Google Images with a certain keyword and download, for example, the first 300 results. After researching, I learned that the Google Images API has been deprecated so I am not really…

Jacob Waite
- 71
- 1
- 4
2
votes
2 answers
Grails Many to Many Association Querying
I have a many to many relationship.
class Post {
String title
static hasMany = [tags:Tag]
}
class Tag {
static hasMany = [posts:Post]
}
I would like to get a list of posts for a tag that have some other criteria (like a sort order,…

Blacktiger
- 1,275
- 1
- 9
- 19
2
votes
1 answer
Selectively retrieving depending on existence of key in map
Is it possible to selectively retrieve depending on the existence of keys in a map in mongodb? And if so, how do you go about doing it?
Suppose I have a document that looks like this for example..
{ "_id": 1234,
"parentfield1" : {
…

user81779
- 307
- 2
- 3
- 7
2
votes
1 answer
Django Many-To-Many query relationship entity
I have the following entities:
Videos
Tags
Relationship entity - VideoTags
Here's the schema:
class Tag(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=100, unique=True)
class Meta:
…

Yuval Kalev
- 111
- 6
1
vote
2 answers
Python Flask - Easy Querying Function
Can somebody explain me the last line return (rv[0] if rv else None) if one else rv ? Especially the role of one.
def query_db(query, args=(), one=False):
cur = g.db.execute(query, args)
rv = [dict((cur.description[idx][0], value)
…

Max
- 13
- 2
1
vote
0 answers
Is there a way to search for keywords across multiple collections in MongoDB?
MongoDB Atlas Cluster version: 5.0.12
MERN Stack Application
Simple Search App that returns Specific ads when keywords are typed in an input.
Front end is handled by React-Redux.
And I am using Axios to request my server for data.
Server is using…

TZ5
- 23
- 5
1
vote
2 answers
Getting indeces of rows given query of header names and respective values in Pandas
I am given a dataframe, a subset of headers and values of those columns. I am interested in finding the indices of the dataframe that contain the values of interest in the columns of interest without explicitly typing in the column name and value;…

wholesome biochemist
- 13
- 3
1
vote
0 answers
How to query SQLAlchemy/PostgreSQL table for existence of an object where PK is UUID
Apologies if this is poorly phrased as I'm pretty new to SQLAlchemy. Suppose I have the following setup:
class Student(Base):
__tablename__ = 'student'
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
name = …

Nick
- 41
- 2
1
vote
2 answers
Optimise conditional queries in Azure cognitive search
we got a unique scenario while using Azure search for one of the project. So, our clients wanted to respect user's privacy, hence we have a feature where a user can restrict search for any PII data. So, if user has opted for Privacy, we can only…

Abhilash Awasthi
- 13
- 3
1
vote
1 answer
Can you insert into a table where a value is a declared variable in mysql?
Is it possible to do something like this ?
INSERT INTO homework(teacherId, class, name, dueDate)
VALUES(teacherId, "12A1", "trig", "tomorrow")
teacherID = (
SELECT teacherId
FROM teacherlogins
WHERE teacherid = 5
)
I…

Saif Khadraoui
- 109
- 1
- 11