카페검색 본문
카페글 본문
-
집계함수1 - COUNT, GROUP BY 2024.04.12해당카페글 미리보기
lname; -- author_lname으로 그룹화 후 각 그룹의 개수를 출력하되 개수가 많은 순으로 출력 SELECT author_lname, COUNT(*) AS books_written FROM books GROUP BY author_lname ORDER BY books_written DESC; -- released_year로 그룹화 후 각 그룹의...
-
table count 2024.01.28해당카페글 미리보기
table_schema in ('public')) SELECT table_schema, TABLE_NAME, (xpath('/row/c/text()', query_to_xml(format('select count(*) as c from %I.%I', table_schema, TABLE_NAME), FALSE, TRUE, '')))[1]::text::int AS rows_n FROM tbl ORDER BY rows_n...
-
Re: 오늘의 마지막 문제. 다음의 SQL을 MVIEW 로 만들어서 QUERY REWRITE 기능을... 2023.11.13해당카페글 미리보기
materialized view deptno_emp_man 2 enable query rewrite 3 as 4 SELECT e.ename AS employee_name, 5 dc1.dept_count AS emp_dept_count, 6 m.ename AS manager_name, 7 dc2.dept_count AS mgr_dept_count 8 FROM emp e, 9 (SELECT deptno, COUNT(*) AS...
-
print(df.groupby('col1').size().reset_index(name='count').sort_values('c.. 2023.08.08해당카페글 미리보기
group by col1 order by 2 desc; """ print(df.groupby('col1').size().reset_index(name='count').sort_values('count', ascending=False)) import dba_auto as a emp=a.table_def('EMP') #emp.to_excel("c:\\aaa2\\emp_df.xlsx") a.easy_dba() 4번 누를...
-
Count on me - Jefferson Starship 1978 2024.05.28해당카페글 미리보기
hoo-hoo-hoo You can count on me, girl (Count on me) You can count on my love (Count on my love) 우.. 소녀여 나에게 의지...Verse 1] Precious love I'll give to you Blue as the sky and deep in the eyes of a love so true Beautiful face...
테이블글 본문
-
group by 퀴즈 22222 :) 2024.04.11
by 오더바이 순서로!!!!! Q. 배급사별로 영화편수를 구하세요 (select 배급사, 영화편수) (영화 편수 역순 정렬) SELECT distribution AS 배급사, COUNT(*) AS distribution FROM movie GROUP BY distribution ORDER BY COUNT(*) DESC; 이렇게 나오네요 :)
-
group by 퀴즈 :) 2024.04.11
개봉월, 영화편수) (영화 편수 역순 정렬) SELECT substr(opendate, 6, 2) AS 개봉월, COUNT(*) AS 영화편수 FROM movie GROUP BY substr(opendate, 6, 2) ORDER BY COUNT(*) DESC; substr 활용해서 오픈데이트의 6번째 열부터 2개 글자를 보여달라- 해서...
-
미드에 많이 나오는 단골표현 (2) : 301~600 2024.03.25
fortune. 379. 배보다 배꼽이 더 크다. The postage costs more than the goods. 380. 비싼 만큼 그 값을 하는군요. It's as good as it costs. 381. 엄청나게 비쌀 거예요. It will cost you an arm and a leg. 382. 감지덕지해야죠. We should count our...