Skip to main content
1 vote
2 answers
58 views

I'm exploring the use of ArrayAgg and I don't understand why 'histidine-[13C6,15N3]' doesn't occur before 'isoleucine-[13C6,15N1]' in this example: In [25]: for i in Infusate.objects.annotate(tns=...
hepcat72's user avatar
  • 1,225
0 votes
1 answer
183 views

I am using this function ARRAY_AGG in snowflake sql. It is giving me [] empty array many times as I have null values there. It is only giving it when i am using case when inside. how can i get just a ...
lil-wolf's user avatar
  • 382
-4 votes
1 answer
33 views

I've emp table which contains name & name2 field. I need the output in a single line. As i dont have unique id(emp_id) in this table, i am getting error as below :- ERROR: aggregate function ...
Gopal.anant's user avatar
1 vote
1 answer
122 views

I am using DuckDB, which should follows postgresql's syntax for the most part. I have two tables t_cons (~200k) and t_flows (~1.2M). For a row of t_cons there are many t_flows that match asset, year, ...
Abel Siqueira's user avatar
2 votes
2 answers
101 views

I have a query in Snowflake that produces json output in rows. 29,000+ rows. I am using this query to create records in an MDM system. However, this ingestion process is a bit inefficient and costly. ...
Scott J's user avatar
  • 25
3 votes
1 answer
100 views

Below is the postgres table table1: CREATE TABLE table1 ( id INT PRIMARY KEY, name TEXT, skills JSON ); with below 3 rows inserted: INSERT INTO table1 (id, name, skills) VALUES (1, 'Alice', ‘[ ...
overexchange's user avatar
  • 17.3k
0 votes
2 answers
423 views

I have a database design with multiple many-to-many relationships, and am trying to write a SELECT statement that retrieves a result set with ONE ROW PER USER. To do this, I'd like to aggregate the ...
wdc92's user avatar
  • 111
0 votes
1 answer
313 views

I have a table in snowflake that has three different columns being used as name type/values. These need to be mapped in an MDM tool using json. Of course, I cannot use the same attribute name more ...
Scott J's user avatar
  • 25
0 votes
2 answers
294 views

For example I have this model: class Parent(models.Model): name = models.CharField(max_length=255) class Child(models.Model): parent = models.ForeignKey(Parent, on_delete=models.CASCADE) ...
Ivan's user avatar
  • 95
2 votes
1 answer
2k views

We can use ARRAY_AGG aggregate function to generate an array from data. The goal is to find a way to limit the input to specific number of entries like ARRAY_AGG(...) WITHIN GROUP(... LIMIT 3) without ...
Lukasz Szozda's user avatar
4 votes
1 answer
1k views

ARRAY_AGG function omits NULL by definition. The requirement is to generate array with the following format: SELECT [NULL, 'a1', 'a2', 'a3', NULL] -- [ undefined, "a1", "a2", ...
Lukasz Szozda's user avatar
1 vote
1 answer
67 views

I need to combine the data of 2 tables, both has the same structure Table 1: key A.a A.b 1 2 2 3 3 4 4 2 1 1 table 2 : key A.a A.b 1 5 5 6 6 ...
Hbaieb Ahmed's user avatar
-1 votes
1 answer
450 views

I have a table containing the following fields: email - logged user email allowed_id - A ID of another User The table contains multiple entries for the same email, each one containing a different ...
andrepz's user avatar
  • 481
1 vote
2 answers
963 views

I have a BigQuery SQL below. The source table is aggregated from another table and field x contains distinct values. To further aggregate on field name, the query unnests x and uses array_agg(distinct ...
ningl's user avatar
  • 329
0 votes
1 answer
67 views

when a person pings or calls, we should be able to show that data and if he doesn't do, it should show as null but when he makes multiple pings or calls, it is appending as multiple array. below is ...
jay's user avatar
  • 5

15 30 50 per page
1
2 3 4 5
8