묻고 답해요
167만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
3-10. 코호트 리텐션 SQL 쿼리 작성하기
코호트 리텐션 시각화하기 부분에서피벗테이블의 값에 설정에 AVERAGE 하는 이유는 무엇인가요?
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
리텐션 SQL 작성하기
쿼리 작성하다가 DISTINCT에 대해 궁금한 점이 생겨 질문 남깁니다!WITH 문 base 와 first_week_data에서 DISTINCT는 중복 방지 즉, 비용 절약을 위해서 쓰는 것으로 이해했습니다. 그렇다면 DISTINCT를 쓰지 않아도 쿼리상 문제는 없는 게 맞을까요?user_count에서 DISTINCT는 유니크 유저수를 위해 꼭 사용해야하는 것으로 이해했습니다.WITH base AS ( SELECT DISTINCT user_id, event_name, DATETIME(TIMESTAMP_MICROS(event_timestamp),'Asia/Seoul') AS event_datetime, DATE(DATETIME(TIMESTAMP_MICROS(event_timestamp),'Asia/Seoul')) AS event_date, user_pseudo_id FROM advanced.app_logs ) ,first_week_data AS ( SELECT DISTINCT user_pseudo_id, DATE_TRUNC(MIN(event_date) OVER (PARTITION BY user_pseudo_id),WEEK(MONDAY)) AS first_week, DATE_TRUNC(event_date,WEEK(MONDAY)) AS week_date FROM base ) ,first_week_diff_data AS ( SELECT *, DATE_DIFF(week_date,first_week,week) AS first_week_diff FROM first_week_data ) ,user_count AS ( SELECT first_week_diff, COUNT(DISTINCT user_pseudo_id) AS user_cnt FROM first_week_diff_data GROUP BY ALL ) ,first_user_count AS ( SELECT first_week_diff, user_cnt, FIRST_VALUE(user_cnt) OVER (ORDER BY first_week_diff) AS first_user_cnt FROM user_count ) SELECT *, ROUND(SAFE_DIVIDE(user_cnt,first_user_cnt),2) AS rentention_ratio FROM first_user_count
-
미해결Flutter로 SNS 앱 만들기
섹션8 게시글 정보가져오기
16:00 에러가 발생되었습니다. 어떻게 해야 하나요.ai로 질문의 답을 받았는데 잘모르겠습니다. void _getFeedList() { WidgetsBinding.instance.addPostFrameCallback((_) async { try { await feedProvider.getFeedList(); } on CustomException catch (e) { errorDialogWidget(context, e); // 에러출력 } }); }이부분을 어떻게 처리하면 됩니까
-
미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
No routes matched location Error Component Stack error 질문입니다.
질문 있어서 남깁니다.메인페이지에서 Link를 타고 upload, list 들어가서 화면이 로드 돼야하는데 돼지 않고 하얀바탕으로 돼면서 Error표시 없이 No routes matched location "/list" Error Component Stack가 표시 됍니다. 어떤문제이고 해결 방법이 무엇인지 궁금합니다.Ps. 질문이 이해 안가실것 같아서 스샷 올려놨습니다.
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
주사위 앱 듣고 있는 중인데 ActivityMainBinding애 import가 보이지 않습니다
<?xml version="1.0" encoding="utf-8"?> <layout> <LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#008000" android:orientation="vertical" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="200dp" android:layout_marginTop="100dp"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textSize="30sp" android:gravity="center" android:textColor="@color/black" android:layout_margin="20dp" android:textStyle="bold" android:text="인생은 주사위 한방에 가는거 아니겠습니까?"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="200dp" android:weightSum="2"> <ImageView android:src="@drawable/dice_1" android:layout_width="120dp" android:layout_height="120dp" android:layout_weight="1"/> <ImageView android:src="@drawable/dice_2" android:layout_width="120dp" android:layout_height="120dp" android:layout_weight="1"/> </LinearLayout> <Button android:id="@+id/DiceStartBtn" android:text="인생 고고" android:layout_width="match_parent" android:background="#@color/black" android:textColor="@color/white" android:layout_height="50dp" android:layout_margin="50dp"/> </LinearLayout> </layout> xml 코드import org.jetbrains.kotlin.storage.CacheResetOnProcessCanceled.enabled plugins { alias(libs.plugins.android.application) alias(libs.plugins.jetbrains.kotlin.android) } android { namespace = "com.seungwon.dice" compileSdk = 34 defaultConfig { applicationId = "com.seungwon.dice" minSdk = 24 targetSdk = 34 versionCode = 1 versionName = "1.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) } } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = "1.8" } dataBinding{ enable=true } } dependencies { implementation(libs.androidx.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) implementation(libs.androidx.activity) implementation(libs.androidx.constraintlayout) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) }gradle코드문제 부분입니다
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
왜 주사위 위치가 저렇게 나올까요?
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#008000" android:orientation="vertical" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="200dp" android:layout_marginTop="100dp" tools:ignore="MissingConstraints"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textSize="30sp" android:gravity="center" android:textColor="@color/black" android:layout_margin="20dp" android:textStyle="bold" android:text="인생은 주사위 한방에 가는거 아니겠습니까?"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="200dp" tools:ignore="MissingConstraints"> <ImageView android:src="@drawable/dice_1" android:layout_width="120dp" android:layout_height="120dp"/> <ImageView android:src="@drawable/dice_2" android:layout_width="120dp" android:layout_height="120dp"/> </LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>제대로 따라서 타이핑 한것 같은데 왜 그럴까요?
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
2-11. 윈도우 함수 연습문제 7번
DATETIE_DIFF 함수 사용할 때 오류가 발생합니다무엇이 잘못되었을까요..?WITH base AS ( SELECT event_date, event_timestamp, DATETIME(TIMESTAMP_MICROS(event_timestamp),'Asia/Seoul') AS event_datetime, event_name, user_id, user_pseudo_id FROM advanced.app_logs ) , prev_event_datetime AS ( SELECT *, LAG(event_datetime) OVER(PARTITION BY user_pseudo_id ORDER BY event_datetime) AS prev_event_datetime FROM base ) SELECT *, DATETIME_DIFF(event_datetime,prev_event_datetime, SECOND) AS second_diff FROM prev_event_datetime
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
1-11 현황 파악 분석하기
현황 파악하기 링크 다시 올립니다!피드백 부탁드립니다~
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
target sdk 34, 에뮬레이터 실행 문제 질문
현재 빌드 진행 중 이러한 오류가 발생합니다.7 issues were found when checking AAR metadata:1. Dependency 'androidx.appcompat:appcompat-resources:1.7.0' requires libraries and applications thatdepend on it to compile against version 34 or later of theAndroid APIs.:app is currently compiled against android-33.Recommended action: Update this project to use a newer compileSdkof at least 34, for example 34.Note that updating a library or application's compileSdk (whichallows newer APIs to be used) can be done separately from updatingtargetSdk (which opts the app in to new runtime behavior) andminSdk (which determines which devices the app can be installedon).2. Dependency 'androidx.appcompat:appcompat:1.7.0' requires libraries and applications thatdepend on it to compile against version 34 or later of theAndroid APIs.:app is currently compiled against android-33.Recommended action: Update this project to use a newer compileSdkof at least 34, for example 34.Note that updating a library or application's compileSdk (whichallows newer APIs to be used) can be done separately from updatingtargetSdk (which opts the app in to new runtime behavior) andminSdk (which determines which devices the app can be installedon).3. Dependency 'androidx.activity:activity:1.8.0' requires libraries and applications thatdepend on it to compile against version 34 or later of theAndroid APIs.:app is currently compiled against android-33.Recommended action: Update this project to use a newer compileSdkof at least 34, for example 34.Note that updating a library or application's compileSdk (whichallows newer APIs to be used) can be done separately from updatingtargetSdk (which opts the app in to new runtime behavior) andminSdk (which determines which devices the app can be installedon).4. Dependency 'androidx.core:core-ktx:1.13.0' requires libraries and applications thatdepend on it to compile against version 34 or later of theAndroid APIs.:app is currently compiled against android-33.Recommended action: Update this project to use a newer compileSdkof at least 34, for example 34.Note that updating a library or application's compileSdk (whichallows newer APIs to be used) can be done separately from updatingtargetSdk (which opts the app in to new runtime behavior) andminSdk (which determines which devices the app can be installedon).5. Dependency 'androidx.transition:transition:1.5.0' requires libraries and applications thatdepend on it to compile against version 34 or later of theAndroid APIs.:app is currently compiled against android-33.Recommended action: Update this project to use a newer compileSdkof at least 34, for example 34.Note that updating a library or application's compileSdk (whichallows newer APIs to be used) can be done separately from updatingtargetSdk (which opts the app in to new runtime behavior) andminSdk (which determines which devices the app can be installedon).6. Dependency 'androidx.core:core:1.13.0' requires libraries and applications thatdepend on it to compile against version 34 or later of theAndroid APIs.:app is currently compiled against android-33.Recommended action: Update this project to use a newer compileSdkof at least 34, for example 34.Note that updating a library or application's compileSdk (whichallows newer APIs to be used) can be done separately from updatingtargetSdk (which opts the app in to new runtime behavior) andminSdk (which determines which devices the app can be installedon).7. Dependency 'androidx.annotation:annotation-experimental:1.4.0' requires libraries and applications thatdepend on it to compile against version 34 or later of theAndroid APIs.:app is currently compiled against android-33.Recommended action: Update this project to use a newer compileSdkof at least 34, for example 34.Note that updating a library or application's compileSdk (whichallows newer APIs to be used) can be done separately from updatingtargetSdk (which opts the app in to new runtime behavior) andminSdk (which determines which devices the app can be installedon).이후 해결을 위해 build.gradle.kts 파일에서compile, target Sdk를 모두 34로 올리고,dependencies { implementation("androidx.core:core-ktx:1.9.0") implementation("androidx.appcompat:appcompat:1.7.0") implementation("com.google.android.material:material:1.12.0") implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("androidx.databinding:databinding-runtime:8.7.0") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.2.1") androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1") }dependencies에서 core-ktx 버전을 1.9.0에서 1.13.1로 올렸습니다.이후 빌드에서 오류가 발생하지 않는 걸 확인했습니다.하지만 이후에도run app이 불가능해서 앱을 확인할 수 없었습니다.혹시 sdk 버전 올라가면서 변경할 점이 추가로 있다면 알려주실 수 있나요..
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
1-11. 현황 파악하기
https://www.notion.so/FOODIE-APP-0186b8e16c164701afc3d7afd66a551f?pvs=4현황 파악해봤습니다! 피드백 부탁드립니다~
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
3-13. 리텐션 분석 과제
"3-13. 리텐션 과제 : 꼭 풀어보시고 제출해주세요" 강의 과제 완료하여 제출 합니다. 링크 : 리텐션 분석 과제 "쿼리 검토 요청"이라고 기재되어 있는 부분 쿼리에 이상이 없는지 확인해주시면 감사하겠습니다!그리고 과제하다가 궁금한 점이 있어 "문의사항"도 남겨두었습니다. 해당 부분도 답변 부탁드립니다! 전반적으로 리텐션 분석을 진행하는 과정이 올바른지에 대해서도 피드백을 주시면 많은 도움이 될 것 같습니다! 강의를 통해 정말 많이 배울 수 있었습니다!감사합니다.
-
미해결Vue 3 & Firebase 10 커뮤니티 만들기 풀스택 - "활용편" (with Pinia, Quasar, Tiptap, VueUse)
Firebase Hosting 후 페이지 안뜰 때!
혹시나 저 같으신 분 있으실까봐 공유해요!firebase hosting 후 Deploy complete! 라고 잘 떴는데도 불구하고 본인이 만든 페이지는 안뜨고 저 화면이 나타날때, 1분정도 기다렸다가 새로고침하니까 제대로 뜨네요 ㅎㅎ이런 이유인지 모르고 이것저것 다시 해보다가(삽질 ㅠㅠ)새로 고침 하니까 바로 뜨네요 😅😅
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
1-9. 퍼널 SQL 쿼리 작성하기
강의 보면서 '퍼널별 유저 수 집계' 쿼리 작성했는데 결과값이 올바르게 나오지 않아요... 어디서 잘못 되었을까요?WITH base AS( SELECT event_date, event_name, DATETIME(TIMESTAMP_MICROS(event_timestamp),'Asia/Seoul') as event_timestamp, event_param, user_id, user_pseudo_id, platform, -- event_parma.key PIVOT MAX(IF(event_param.key='firebase_screen',event_param.value.string_value,null)) AS firebase_screen, -- MAX(IF(event_param.key='food_id',event_param.value.int_value,null)) AS food_id, MAX(IF(event_param.key='session_id',event_param.value.string_value,null)) AS session_id FROM advanced.app_logs CROSS JOIN UNNEST(event_params) as event_param GROUP BY ALL) -- event_name + screen (필요한 이벤트만 where 조건에 걸어서 사용) ,filter_event as( SELECT * except(event_name,firebase_screen), concat(event_name,'-',firebase_screen) AS event_name_with_screen FROM base WHERE event_name in ('screen_view','click_payment')) SELECT event_name_with_screen, -- step_number case when event_name_with_screen='screen_view-welcome' then 1 when event_name_with_screen='screen_view-home' then 2 when event_name_with_screen='screen_view-food_category' then 3 when event_name_with_screen='screen_view-restaurant' then 4 when event_name_with_screen='screen_view-cart' then 5 when event_name_with_screen='click_pavement-cart' then 6 else null end AS Step_number, count(DISTINCT user_pseudo_id) as cnt FROM filter_event GROUP BY ALL HAVING step_number IS NOT NULL
-
미해결Flutter로 SNS 앱 만들기
섹션8에서 게시글 정보 가져오기에서 timeStamp에러 입니다.
섹션8에서 게시글 정보 가져오기에서16:00WidgetsBinding.instance.addPostFrameCallback(callback) 나봅니다. 강의처럼 timeStamp가 나오지 않고,그래서 그냥 진행했습니다.WidgetsBinding.instance.addPostFrameCallback((_) async {그런데 다음과 같이 에러가 뜨네요.이런 메세지가 뜨는 이유가 뭔가요
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
[과제] 퍼널 쿼리(피벗테이블 적용) 작성
# base 쿼리 작성 전 생각 흐름 ---------------------------------------------------- ## 1. 테이블 내 데이터 구조 파악 -- select -- * -- from advanced.app_logs -- where -- event_date = '2022-08-01' -- 목적에 맞는 쿼리를 기존 데이터로 구현할 수 있는지 여부 확인 -- 연습문제 결과물 컬럼인 'event_name_with_screen', 'step_number', 'cnt'는 기존 컬럼에 없음. -- 기존 컬럼에 없기 때문에 해당 컬럼을 어떻게 구현해내야 할 지 생각해보기 ## 2. event_name_with_screen 컬럼 구현 순서 및 방법 -- event_name_with_screen는 다음과 같은 value를 가짐 -- 1. screen_view-welcome -- 2. screen_view-home -- 3. screen_view-food_vategory -- 4. screen_view-restaurant -- 5. screen_view-cart -- 6. click_payment-cart -- 위 6가지 value가 기존 컬럼에 있는지 확인해보기 -- 있는 경우 -- 기존 컬럼 활용 -- 없는 경우 -- concat 등으로 새롭게 구현 -- 연습문제에서는 event_name과 event_params.key에 있는 value를 concat 했음. -- event_params.key는 데이터타입이 struct이기 때문에 unnest 필요. -- select -- event_name, -- unnest_event_params -- from advanced.app_logs -- cross join unnest(event_params) as unnest_event_params -- where -- event_date = '2022-08-01' -- unnest 결과물에 피봇테이블 적용하기 -- 피봇테이블로 만들면 직관적으로 event_name과 concat 하기가 용이해서. -- select -- event_name, -- event_date, -- event_timestamp, -- user_pseudo_id, -- max(if(unnest_event_params.key = 'firebase_screen', unnest_event_params.value.string_value, null)) as firebase_screen, -- max(if(unnest_event_params.key = 'food_id', unnest_event_params.value.int_value, null)) as food_id, -- max(if(unnest_event_params.key = 'session_id', unnest_event_params.value.string_value, null)) as session_id -- from advanced.app_logs -- cross join unnest(event_params) as unnest_event_params -- where event_date between '2022-08-01' and '2022-08-18' -- group by 1, 2, 3, 4 ---------------------------------------------------- with base as ( select event_name, event_date, event_timestamp, user_pseudo_id, max(if(unnest_event_params.key = 'firebase_screen', unnest_event_params.value.string_value, null)) as firebase_screen, max(if(unnest_event_params.key = 'food_id', unnest_event_params.value.int_value, null)) as food_id, max(if(unnest_event_params.key = 'session_id', unnest_event_params.value.string_value, null)) as session_id from advanced.app_logs cross join unnest(event_params) as unnest_event_params where event_date between '2022-08-01' and '2022-08-18' group by 1, 2, 3, 4 ), base2 as ( select *, concat(event_name, '-', firebase_screen) as event_name_with_screen from base ) ## 일자별 퍼널 쿼리 , base3 as (select event_date, event_name_with_screen, # 2개 이상 조건을 한 개 컬럼에 적용해야 하기 때문에 case when 사용 case when event_name_with_screen = 'screen_view-welcome' then 1 when event_name_with_screen = 'screen_view-home' then 2 when event_name_with_screen = 'screen_view-food_category' then 3 when event_name_with_screen = 'screen_view-restaurant' then 4 when event_name_with_screen = 'screen_view-cart' then 5 when event_name_with_screen = 'click_payment-cart' then 6 else null end as step_number, # 중복되지 않은 사용자수(비로그인 이용자까지)를 파악하기 위해서 count(distinct 컬럼명) 사용 count(distinct user_pseudo_id) as cnt from base2 group by all # null 값 제외하기 위해서 그룹에 필터링 거는 having 사용 having step_number is not null # 1일부터 보고 싶기 때문에 오름차순(asc) 적용 order by 1 asc) ## 일자별 쿼리 (피벗테이블 적용) select event_date, max(if(event_name_with_screen = 'screen_view-welcome', cnt, 0)) as screen_view_welcome, max(if(event_name_with_screen = 'screen_view-home', cnt, 0)) as screen_view_home, max(if(event_name_with_screen = 'screen_view-food_category', cnt, 0)) as screen_view_food_category, max(if(event_name_with_screen = 'screen_view-restaurant', cnt, 0)) as screen_view_restaurant, from base3 group by all order by 1 asc
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
1-6. 데이터 PIVOT 연습문제
빅쿼리 날짜 타입 입력할때 큰따옴표, 작은 따옴표 둘 중에 아무거나 입력해도 상관없을까요?
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
image1.setOnClickListener { }
image1.setOnClickListener { } 여기서 괄호에 엔터 치시면 it: view! 가 회색으로 바뀌시던대 저는 엔터쳐도 아무 반응이 아무것도 안뜨네요 .. 제가 임의로 it: view!를 쳐넣어도 회색으로 바뀌지도 않고요.. 어찌해야하나요
-
해결됨BigQuery(SQL) 활용편(퍼널 분석, 리텐션 분석)
1-4 ARRY ,STRUCT 연습문제
어느 부분에서 오류 났는지 모르겠어요!
-
미해결Flutter로 SNS 앱 만들기
8:18 저는 왜이리 이해가 안될까요. 보고 또보고 해도 포기해야 되겠죠...
Future<List<FeedModel>> getFeedList() async { QuerySnapshot<Map<String, dynamic>> snapshot = await firebaseFirestore .collection('feeds') .orderBy('createAt', descending: true) .get(); return await Future.wait(snapshot.docs.map((e) async { Map<String, dynamic> data = e.data(); DocumentReference<Map<String, dynamic>> writerDocRef = data['writer']; DocumentSnapshot<Map<String, dynamic>> writerSnapshot = await writerDocRef.get(); UserModel userModel = UserModel.fromMap(writerSnapshot.data()!); data['writer'] = userModel; return FeedModel.fromMap(data); }).toList()); }이부분에서 return await Future.wait(snapshot.docs.map((e) async { Map<String, dynamic> data = e.data(); DocumentReference<Map<String, dynamic>> writerDocRef = data['writer']; DocumentSnapshot<Map<String, dynamic>> writerSnapshot = await writerDocRef.get(); UserModel userModel = UserModel.fromMap(writerSnapshot.data()!); data['writer'] = userModel; return FeedModel.fromMap(data);이부분을 왜 이리 이해하기가 어려운지 모르겠어요..저만 그런가요...돌려봐도 싶지 않네요..
-
미해결Part2: 초중급 iOS 인스타그램 클론(SwiftUI, MVVM, Firebase, 2024)
firebase에서 데이터를 불러오는데 오류가 발생합니다.
grpc.resource_quota=0x600000cab5a0, grpc.server_uri=dns:///firestore.googleapis.com}}: connect failed (UNKNOWN:(domain:NSPOSIXErrorDomain, code:50, description:The operation couldn’t be completed. Network is down)위의 오류가 발생하는데 로그인 정보는 제대로 출력되는데 다른 부분에서 데이터를 불러오지 못하는데 어떤 부분을 수정해보면 좋을까요?