<jupyter_start><jupyter_text>SCRATCH WORK<jupyter_code>import pandas as pd

project_id = 'stackoverflow-qa'
sample_count = 2000
df = pd.io.gbq.read_gbq('''
SELECT *
FROM `bigquery-public-data.stackoverflow.posts_answers` AS question
LIMIT 100
''', project_id = project_id, dialect= 'standard')

df.head()
import pandas as pd

project_id = 'stackoverflow-qa'
sample_count = 2000
df = pd.io.gbq.read_gbq('''
SELECT *
FROM `bigquery-public-data.stackoverflow.posts_questions` AS question
INNER JOIN `bigquery-public-data.stackoverflow.posts_answers` AS answers
LIMIT 100
''', project_id = project_id, dialect= 'standard')

df.head()
# SELECT
#   questions.title,
#   questions.Id as 'q_id',
#   questions.body as 'q_body',
#   questions.score as 'q_score',
#   (case 
#     when questions.AcceptedAnswerId = answers.Id
#     then 1
#     else 0 end) as 'acc_a',
#   answers.Id as 'a_id',
#   answers.body as 'a_body',
#   answers.score as 'a_score'
# FROM Posts answers
# INNER JOIN Posts questions ON answers.parentid = questions.id
# WHERE questions.title like '%how%'
# AND questions.tags like '%java%'
# AND questions.tags not like '%javascript%'
# AND answers.score > 0
# order by questions.id asc
# OFFSET 50000 ROWS
# FETCH FIRST 50000 ROWS ONLY;<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup