Questions tagged [mode-analytics]
14 questions
3
votes
3 answers
Extracting Values from Array in Redshift SQL
I have some arrays stored in Redshift table "transactions" in the following format:
id, total, breakdown
1, 100, [50,50]
2, 200, [150,50]
3, 125, [15, 110]
...
n, 10000, [100,900]
Since this format is useless to me, I need to do some processing on…

Ajax729
- 65
- 1
- 7
2
votes
1 answer
Deleting Mode Analytics Bridge Connector
After installing the Mode Analytics Bridge Connector for a remote MySQL database I decided to use another type of connection.
I installed this .pkg and ran this code:
/usr/local/mode/bin/mode-bridge-config -init…

Mike
- 1,080
- 1
- 9
- 25
1
vote
0 answers
FULL OUTER JOIN/COALESCE isn't populating properly
I have no idea why my coalesce function isn't working.
I have two tables that I'm drawing from.
Table 1 and Table 2
Table 1 price is 0. Table 2 price is 0.33. If I coalesce I should get the 33 cents.
I do a FULL OUTER JOIN on both tables. I run the…

Maggie Liu
- 344
- 1
- 3
- 15
1
vote
1 answer
How to sum values if I don't have column to group it by
I need to sum sales grouped by country, but I have to group them manually because I don't have any other way.
Unfortunately, I don't have the column 'continent', but there are not too many countries on the list so I can do it manually. I can't…

Zole72
- 39
- 4
1
vote
1 answer
How can I use a select query in SQL to find a list of email addresses that only contain 6 random numbers?
I’m currently looking for a way to use a SQL query in order to find a list of all email addresses in our DB has only 6 random numbers and then ‘@gmail.com’.
Example:
email
----------
123456@gmail.com
324522@gmail.com
Here is what I tried:…

JG733
- 31
- 4
0
votes
0 answers
HOW to find the avg difference in order time in SQL
the dataset of subquery is here
id itm_id paid_at ord_r total_r
17 3266 2013-05-25 08:27:17 1 3
17 3219 2013-05-25 08:27:17 2 3
17 3964 2013-05-25 08:27:17 3 3
25 2105 2013-05-17 03:11:48 1 2
25 1376 …

Md Sani
- 1
- 2
0
votes
1 answer
mode notebook code migration to Google Notebook
I have python code executed in Mode 'Python Notebook' and want to migrate the code to Google Cloud Platform.I am using Google Bigquery to load the data in database.
I have found Google DataLab and CoLab(Colaboratory) as an best alternative.Does…

nikhil
- 149
- 1
- 2
- 12
0
votes
3 answers
Find latest status using 2 tables in SQL
I have the following 2 tables:
orders
id | user | amount |
1 | ALEX | 10 |
2 | BARB | 20 |
3 | CARL | 30 |
4 | DAVE | 40 |
5 | EVIE | 50 |
6 | FRAN | 60 |
history
order_id | status | date |
1 | pending | 2017-04-01 10:02:47 | …

Ronny Villalobos
- 1
- 1
0
votes
1 answer
Total time spend by day on one page
I have a table which summarize the time spent by users on a specific page of the app.
I want to get the total time spent on this page per day.
The table:
user_id date label_of_the_page
1 2019-03-03T00:21:56.384Z . …

nolwww
- 1,355
- 1
- 15
- 33
0
votes
2 answers
Using Count case
So I've been just re-familiarizing myself with SQL after some time away from it, and I am using Mode Analytics sample Data warehouse, where they have a dataset for SF police calls in 2014.
For reference, it's set up as this:
incident_num, category,…

Kbbm
- 375
- 2
- 15
0
votes
0 answers
Pandas Multi-Index DataFrame styling without using apply() or applymap()
I'm trying to highlight or emphasize the "Total" rows in my DataFrame. It looks like using apply() or applymap() is the most common way people have done conditional formatting but I'd like to simply identify rows to format using multi-index slicing.…

Zach Mandell
- 13
- 4
0
votes
2 answers
How do I include results in my dataset when my WHERE clause filters them out?
I want to make a list of all the salespeople and count how many demos they've done in the last week.
I'm using mode analytics, so the {{@dummy_accounts}} and {{@active_sdrs}} are just shortcuts for subqueries. The first just gets a list of the…

Sebastian
- 957
- 3
- 15
- 27
0
votes
0 answers
Plot directional edges as non-overlapping lines
I have a networkx directional graph. I'd like to plot it so that nodes that interact (A->B, B->A) have two edges displayed and the colors correspond to the relative weights.
Currently I have a simple three-node graph. Naturally the flow is "order…

ScottieB
- 3,958
- 6
- 42
- 60
-1
votes
1 answer
How do we filter struct datatypes using SQL?
I am using mode analytics which has a struct datatype in the table.
The sample values available are as below. I have a case number and want to filter by that number to get all corresponding rows.

Praveenrajan27
- 611
- 6
- 9