반응형
연습 syntax Discription
학습주제 : select, where 쿼리조건은 " " 로 둘러쌀것. select * 안붙이면 자동으로 전체 데이터
query($A$12:$H$18,"select *",1) select 선택열은 , 로 구분
query($A$12:$H$18,"select A,D,F",1) label 조건에는 , 없이 나열하고 바꿀조건에는 ' ' 로 명기
query($A$12:$H$18,"label A '이름'",1) (contains 'A') 조건은 ' ' 로 둘러쌀것
query($A$12:$H$18,"where A contains 'J'",1) (starts with) ' 와 " 는 띄어쓰기 상관없음. 띄어도 되고 붙여도 됨
query($A$12:$H$18,"where A starts with 'J'",1) ends with
query($A$12:$H$18,"where A ends with 'e'",1) (like 'D') D__는 언더바 갯수만큼으로 구성된 단어를 의미 4글자면 D___
query($A$12:$H$18,"where A like 'D___'",1) like 'D%' %는 문자열의미
query($A$12:$H$18,"where A like 'D%'",1) (not A like) A not like는 에러
query($A$12:$H$18,"where not A like 'D%' ",1)
query($A$12:$H$18,"where A !='D%' ",1) (not A ends with)
query($A$12:$H$18,"where not A ends with'e' ",1) (not A is null) 조건에 ' ' 없이 사용
query($A$12:$H$18,"where not A is null ",1) (A is not null) 조건에 ' ' 없이 사용
query($A$12:$H$18,"where A is not null ",1) (<>'null) 조건에 ' ' 를 붙여야 함
query($A$12:$H$18,"where A <> 'null' ",1) 숫자로 조건줄때 작은따옴표(' ') 없음
query($A$12:$H$18,"where D >700 ",1) 여러조건줄때 and, or 로 연결
query($A$12:$H$18,"where D >400 and F >25 ",1) 여러조건줄때 and, or 로 연결하고 조건과 조건사이는 컴마(,) 없음
query($A$12:$H$18,"where not A starts with 'J' and D>400 and F>25",1) (format D '조건')
query($A$12:$H$18,"format D '$#,000'",1) (format)여러 조건을 줄때 조건간을 콤마(,)로 구분
query($A$12:$H$18,"format D '$#,000',E 'yy/mm/dd'",1) (format)여러 조건을 줄때 조건간을 콤마(,)로 구분
query($A$12:$H$18,"format D '$#,000',E 'yy/mm/dd',F '#.000'",1)
함수명 쿼리연습 기업방법 문법
countif 범위의 갯수를 결과값으로 초과 >n 크다 =countif(범위,기준) ={countif(H2:H6,">=0"),countif(H2:H6,"<0")}
미만 <n 작다

=countifs(기준_범위1,기준1,기준_범위2,기준2,....)

이상 >=n 크거나 같다
이하 <=n 작거나 같다
반응형

+ Recent posts