python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Update PgSQL Self JOIN With Custom Values
I'm trying to use UPDATE SELF JOIN and could not seem to get the correct SQL query.
Before the query, I execute this SQL query to get the values:
SELECT DISTINCT ON (purpose) purpose FROM user_assigne...
Franz Noel
Votes: 0
Answers: 1
SQL - check if a date is within 14d in another column and return the most recent date
I have a data set that has the following columns:
user_id,
A_view_dt,
A_conversion_dt
B_view_dt.
I wanted to check
If A_conversion_dt IS NOT NULL, then see if there's another record in B_view_dt that ...
daniellerobinson7836
Votes: 0
Answers: 2
Combining overlapping date ranges without using a cross join in BigQuery
If I have this dataset:
create schema if not exists dbo;
create table if not exists dbo.player_history(team_id INT, player_id INT, active_from TIMESTAMP, active_to TIMESTAMP);
truncate table dbo.playe...
Anton
Votes: 0
Answers: 2
Self join on column that may not have data
I have a MySQL table (menu_items) of items used to build a menu. See data below. Each menu item is either a parent or a child. Items with a parent_id of 0 is a parent. Items with a 'parent_id' > 0...
scott80109
Votes: 0
Answers: 1