in Education by
I'm trying to select rows that have the same column values using BigQuery on Githubs public data. I'd approach it like so using SQL server but I am getting "Correlated subqueries that reference other tables are not supported unless they can be de-correlated, such as by transforming them into an efficient JOIN." error message. select t1.id as id, t1.path as path from `bigquery-public-data.github_repos.sample_files` t1 where exists (select path from `bigquery-public-data.github_repos.sample_files` t2 where t1.path = t2.path group by path, id having count(id) > 1) I've also tried performing self-joins like so: SELECT t1.repo_name as repo_name, t1.path as path, t2.repo_name as reponame2, t2.path as path2 FROM `bigquery-public-data.github_repos.sample_files` as t1 JOIN `bigquery-public-data.github_repos.sample_files` as t2 ON t1.path = t2.path GROUP BY repo_name, path, reponame2, path2 But I'm getting timeout errors for this. What's the correct way to achieve this? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I think you are looking for below (at least this is a direct translation of your original query to one that actually works while preserving the logic) select id, path from `bigquery-public-data.github_repos.sample_files` qualify count(id) over(partition by path) > 1

Related questions

0 votes
    In my database I have some records where I am sorting by a column that contains identical values: | ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    I have a table containing the last comments posted on the website, and I'd like to join a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    I have a table containing the last comments posted on the website, and I'd like to join a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    I have a table containing the last comments posted on the website, and I'd like to join a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I have a table containing the last comments posted on the website, and I'd like to join a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 16, 2022 in Education by JackTerrance
0 votes
    A lock that allows concurrent transactions to access different rows of the same table is known as a ( ... Protocols topic in section Concurrency Control of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    I have an experiment where I need to subtract values of two different treatments from the Control (baseline), but these ... , named block and year sampled. Dummy data frame: df...
asked May 30, 2022 in Education by JackTerrance
0 votes
    I have an experiment where I need to subtract values of two different treatments from the Control (baseline), but these ... , named block and year sampled. Dummy data frame: df...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have two Dataframes : DF1(That i've just resampled): Mi_pollution.head(): Sensor_ID Time_Instant ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 3, 2022 in Education by JackTerrance
0 votes
    I would like to take a list of names (e.g. john, mary, paul) and create a SQLite "select" ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I have a record in my table like memberId PersonId Year 4057 1787 2 4502 1787 3 I want a result ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 21, 2022 in Education by JackTerrance
0 votes
    I want to select rows from a DataFrame based on values in some column in pandas, How can I do it? I ... WHERE column_name = some_value Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    what are in a spreadsheet program, rows and column collectively? Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    In _______________ index instead of storing all the columns for a record together, each column is stored ... topic in portion Indexing and Hashing of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    You have a column that will only contain values from 0 to 256. What is the most economical data ... Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
...