일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- nlp논문
- HackerRank
- SQL 날짜 데이터
- Window Function
- SQL코테
- MySQL
- 서브쿼리
- 짝수
- sql
- 자연어 논문 리뷰
- airflow
- 자연어처리
- update
- 설명의무
- 그룹바이
- LSTM
- 코딩테스트
- 표준편차
- GRU
- 논문리뷰
- NLP
- t분포
- torch
- leetcode
- CASE
- 카이제곱분포
- 자연어 논문
- Statistics
- inner join
- sigmoid
- Today
- Total
목록MySQL (21)
HAZEL
User - defined Function - Mysql 01. 기본 구조 CREATE FUNCTION '함수이름 function name' ('parameter name', 'datatype' ) RETURN '출력될 결과의 datatype' ( DETERMINISTIC ) BEGIN DECLARE 'variable name' 'datatype'; SET; RETURN ( Query ) / 'variabel name'; END -- 사용 방법 SELECT 'function name' (parameter) ( DETERMINISTIC ) : 은 NOT DETERMINISTIC 이 defalt 임. 인풋값은 똑같고, 아웃풋값이 호출할 때마다 같을때, DETERMINISTIC 을 적어주고, 아니면 defal..
180. Consecutive Numbers >> 문제 +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | num | varchar | +-------------+---------+ id is the primary key for this table. Write an SQL query to find all numbers that appear at least three times consecutively. Return the result table in any order. The query result format is in the following example: Logs table: +----+-..
The Report >> 문제 You are given two tables: Students and Grades. Students contains three columns ID, Name and Marks. Grades contains the following data: Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. The report must be in descending order by grade -- i.e. higher grades ar..
Challenges >> 문제 Julia asked her students to create some coding challenges. Write a query to print the hacker_id, name, and the total number of challenges created by each student. Sort your results by the total number of challenges in descending order. If more than one student created the same number of challenges, then sort the result by hacker_id. If more than one student created the same numb..
184. Department Highest Salary >> 문제 The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id. +----+-------+--------+--------------+ | Id | Name | Salary | DepartmentId | +----+-------+--------+--------------+ | 1 | Joe | 70000 | 1 | | 2 | Jim | 90000 | 1 | | 3 | Henry | 80000 | 2 | | 4 | Sam | 60000 | 2 | | 5 | Max | 90000 | 1..
196. Delete Duplicate Emails >> 문제 Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. +----+------------------+ | Id | Email | +----+------------------+ | 1 | john@example.com | | 2 | bob@example.com | | 3 | john@example.com | +----+------------------+ Id is the primary key column for this table. For example, afte..
627. Swap Salary >> 문제 +-------------+----------+ | Column Name | Type | +-------------+----------+ | id | int | | name | varchar | | sex | ENUM | | salary | int | +-------------+----------+ id is the primary key for this table. The sex column is ENUM value of type ('m', 'f'). The table contains information about an employee. Write an SQL query to swap all 'f' and 'm' values (i.e., change all 'f..
Binary Tree Nodes >> 문제 You are given a table, BST, containing two columns: N and P, where N represents the value of a node in Binary Tree, and P is the parent of N. Write a query to find the node type of Binary Tree ordered by the value of the node. Output one of the following for each node: Root: If node is root node. Leaf: If node is leaf node. Inner: If node is neither root nor leaf node. Sa..
Placements >> 문제 You are given three tables: Students, Friends and Packages. Students contains two columns: ID and Name. Friends contains two columns: ID and Friend_ID (ID of the ONLY best friend). Packages contains two columns: ID and Salary (offered salary in $ thousands per month). Write a query to output the names of those students whose best friends got offered a higher salary than them. Na..
1] Weather Observation Station 3 >> 문제 Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. >> 문제 푼 코드 SELECT distinct city FROM STATION WHERE id % 2 = 0 www.hackerrank.com/challenge..