I’m new to UDF functions and I have created a BigQuery UDF that takes a polygon geometry and creates points with it. I’m trying to draw dot density maps (converting polygon + population number to …
query monitor in wordpress shows slow query
I have a slow query on a wordpress site. I believe it’s my subquery inside it for the ‘abbreviation’. How can I rewrite this to make it faster? I’m not having much luck. The query takes about 0….
Complex SQL query aggregation and grouping on athena
I have a table like this: I would like to retrieve the number of chat performed by users for each database (db) and the last part where I fail, retrieve also a list of all mentors by users. The final output should be like this for example (notice there is only one time max for greg in the admin column)
Microsoft Sync Framework unique index error
I use the MS Sync Framework to sync my SQL Server instance with a local SQL CE file to make it possible working offline with my Windows app. I use GUIDs as keys. On my table I have a unique index on 2 columns: user_id and setting_id: Now I do the following: I create a new record in this table
making sure only an existing user in the table can add a record in PostgreSQL
I have something like fb groups, where people can be moderators. If a user wants to add a moderator to a certain group, I’d like to check that first of all he himself is a moderator of this group. …
SQL in Oracle HR Schema
I have made a query in Oracle HR schema to see the following information: The city where the department is located The total number of employees in the department However, the query cannot be …
TSQL – Select Latest Date by 2 Type
I need select data in SQL Server. I have a Data example like this DECLARE @tblA TABLE (ID int, SubId int, Createdate DateTime) INSERT INTO @tblA VALUES (1, 1, ’10/21/2020′) , …
Simplify nested queries
select name from person, author, article where name != “John Doe” AND person.pid = author.pid AND author.aid = article.aid AND title = select title from …
Query to check if MySQL database is connected
I am wondering if there is a best practice or standard query used to check if a MySQL database is still connected? I was originally thinking of performing a simple search in one of my tables, which will confirm if the database is still there. Just wondering if there is a better approach. Answer No need to act…
Join fom two source tables into a single column
How would I accomplish this? I’m lost on how to accomplish this. I have a table with relationships to a like named field in two different tables. I’m trying to join them such that the two columns get …