blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
4e899db9e81d8fa7a65d682cf792a7e2b549c946 | SQL | tanqiwei/JavaTrainingHomework | /week05/题目10/jdbc-mysql-study-demo/src/main/resources/mysql.sql | UTF-8 | 281 | 3.28125 | 3 | [] | no_license | create table test.student
(
name varchar(20) null,
serialNo varchar(20) not null,
phone varchar(20) null,
address varchar(20) null,
constraint student_serialNo_uindex
unique (serialNo)
);
alter table test.student
add primary key (serialNo); | true |
444f00631467383dd051e70ff806c5775ade4e26 | SQL | ulaireatea/MySQL | /aula13(exercicios).sql | UTF-8 | 468 | 3.21875 | 3 | [
"MIT"
] | permissive | select profissao, count(nome) from gafanhotos
group by profissao;
select sexo, count(*) from gafanhotos
where nascimento > '2005-01-01'
group by sexo;
select distinct nacionalidade, count(*) from gafanhotos
where nacionalidade not like 'Brasil'
group by nacionalidade
having count(nacionalidade) > 3;
select distinct ... | true |
f52c910d42c0a4a6d83d029925466908bec21f5c | SQL | EricRicketts/SQL | /TeachYourselfSQLInTenMinutes/TeachYourselfSQL_SQLite/Lesson13/challenges/problem_three.sql | UTF-8 | 134 | 3.59375 | 4 | [] | no_license | SELECT P.prod_name, OI.order_num
FROM Products AS P
LEFT OUTER JOIN OrderItems AS OI
ON P.prod_id = OI.prod_id
ORDER BY P.prod_name; | true |
c9b22b488b721243a8add75ba5cf94905c8a9263 | SQL | CUBRID/cubrid-testcases | /sql/_13_issues/_12_1h/cases/bug_bts_6672.sql | UTF-8 | 1,674 | 3.125 | 3 | [
"BSD-3-Clause"
] | permissive | create table a01(id short primary key auto_increment);
insert into a01 values(null), (null), (null);
desc a01;
alter table a01 add column col3 timestamp default CURRENT_TIMESTAMP ;
desc a01;
drop table a01;
create table a01(id short primary key auto_increment);
insert into a01 values(null), (null), (null);
alter table... | true |
1fc8298d475b6393ad137b7f34ee965067f22139 | SQL | adebayus/dumbways060321 | /library.sql | UTF-8 | 3,296 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 06, 2021 at 03:58 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
8e1abc2166d155c2b0d87b503ee5abdec0a19b23 | SQL | BulkSecurityGeneratorProject/E-book | /src/main/resources/config/cql/changelog/20180307125433_added_entity_Author.cql | UTF-8 | 191 | 2.84375 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS author (
id uuid,
name text,
biography text,
genre text,
ratings_total double,
ratings_avg double,
ratings int,
PRIMARY KEY(id)
);
| true |
e27c8a69d2c1e46244d8dc2d2609a081772838a4 | SQL | hisland/my-learn | /sql/01.insert.sql | UTF-8 | 419 | 3.296875 | 3 | [] | no_license | DROP TABLE IF EXISTS TMP_TABLE;
CREATE TABLE TMP_TABLE (one VARCHAR(20), two INTEGER);
-- 一行
INSERT INTO
TMP_TABLE
VALUES
('hey', 2);
-- 多行
INSERT INTO
TMP_TABLE
VALUES
('hey1', 1),
('hey2', 2),
('hey3', 3);
-- 只插入指定列的值, 其余列为 NULL 或者 是默认值, 或者 递增值
INSERT INTO
TMP_TABLE (two)
VALUES
(4... | true |
c1e043a7bc545eb0f3d15df19631ce4cf3e1b760 | SQL | rejmar/egzamator-backend | /sql-scripts/INSERTING.sql | UTF-8 | 2,583 | 3.359375 | 3 | [] | no_license | -- ROLES:
INSERT INTO egzamator.role (name) VALUES("ROLE_STUDENT");
INSERT INTO egzamator.role (name) VALUES("ROLE_TEACHER");
INSERT INTO egzamator.role (name) VALUES("ROLE_ADMIN");
-- subject:
INSERT INTO egzamator.subject(name) VALUES ("IT");
INSERT INTO egzamator.subject(name) VALUES ("Mathematics");
INSERT INTO eg... | true |
799720aaee09df3aa3eb79e956d3aa0759f19b5f | SQL | CUBRID/cubrid-testcases | /sql/_15_fbo/_02_qa_test/cases/fbo_dml_insert10.sql | UTF-8 | 1,117 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | --insert data into super/sub class with blob/clob column
create class insert10_t1 (name varchar(20), age integer, photo blob);
create class sub_insert10_t1 as subclass of insert10_t1(doc clob);
insert into insert10_t1 values('Jerry', 25, bit_to_blob(X'0101'));
insert into insert10_t1 values('Tom', 26, bit_to_blob(X'0... | true |
6ed2eb005b48d3511b415c255f7af93b669bb6f2 | SQL | HQS1983/dianjing | /电竞接口my_test.sql | UTF-8 | 38,150 | 2.984375 | 3 | [] | no_license | 贴吧电竞
http://admin.con.com:9088
http://admin.con.com:9088/api/game/
没有相关游戏id不能参赛
贴吧电竞api相关页面接口
如何用户有登陆接口带上用户的token
考虑到每个页面都有多个数据层,并且有时候用户只想看单个数据层的数据
每个数据层都会独立接口
首页接口相关api
返回结果中的参数还需要沟通,以配合相关需求
1:
获取参加赛事的游戏的api
地址 http://192.168.101.99:8088/game/
方法 get
参数说明
参数名称 类型 ... | true |
e29313ffd67864725a91db86b4b17896c9845fc6 | SQL | future4code/Silvio-Viana | /semana18/projeto/cookenu/tables.sql | UTF-8 | 948 | 3.328125 | 3 | [] | no_license | CREATE TABLE Cookenu_Users (
id VARCHAR(64) PRIMARY KEY,
name VARCHAR(64) NOT NULL,
email VARCHAR(64) UNIQUE NOT NULL,
role ENUM("NORMAL", "ADMIN") DEFAULT "NORMAL",
password VARCHAR(64) NOT NULL
);
-- Apenas ADMINS podem Criar ADMINS
-- Conta ADMIN para criação de outras contas
-- login: "admin@base.com" password: "... | true |
b2f0e9d601ba2c79ae471a4022fed8fcaf73d01b | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day15/select1939.sql | UTF-8 | 267 | 3.140625 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['6212','2076','5076','1433','4029','5072','4044','5209','1420','3039'])
| true |
48c634bbd376df95bb16a2746afae78ad9786245 | SQL | CoptimT/MyProject1 | /channel_spread/wf/hql/channel_spread_statistic.sql | UTF-8 | 2,352 | 4.125 | 4 | [] | no_license | -- 1.结果统计
CREATE TABLE IF NOT EXISTS dwv_yzb.dwv_yzb_channel_spread_statistic(
day string comment '日期',
app string comment 'app',
spread_name string comment '渠道',
today_add bigint comment '今天的新增',
today_update bigint comment '今天的升级',
yesterday_add bigint comment '昨天的新增',
yesterda... | true |
747bf47870456f476e5606c09ea87b4d046a7316 | SQL | cityofasheville/simplicity-graphql-server | /database/views/budget_parameters_view.sql | UTF-8 | 545 | 3.3125 | 3 | [
"MIT"
] | permissive | -- View: simplicity.budget_parameters_view
-- DROP VIEW simplicity.budget_parameters_view;
CREATE OR REPLACE VIEW simplicity.budget_parameters_view AS
SELECT a.defaultyear,
a.currentyear,
a.in_budget_season
FROM ( SELECT glp1.defaultyear,
glp1.currentyear,
( SELECT coa_app_paramete... | true |
11a99f3cb6491d1a4aa91f2e96afe7e0f5a806d2 | SQL | tyrasd/osmaxx | /osmaxx/conversion/converters/converter_gis/bootstrap/sql/filter/address/010_address.sql | UTF-8 | 2,729 | 3.609375 | 4 | [
"MIT"
] | permissive | ------------------
-- building --
------------------
-- Without the Entrance Node i.e; just the building --
INSERT INTO osmaxx.address_p
SELECT osm_id as osm_id,
osm_timestamp as lastchange,
'N' AS geomtype, -- When address is linked to a node
way AS geom,
'b' AS type, -- When address is link... | true |
563d60ccc3b02a034ecb9e6622b3adbe6eda3216 | SQL | zakky-sy/plamil | /plamil.sql | UTF-8 | 1,860 | 2.9375 | 3 | [
"Unlicense"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 01, 2021 at 10:29 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
51a65beaea0cc744a7d892498f42c83770259728 | SQL | peltonpa/Foorumi | /sql/create_tables.sql | UTF-8 | 891 | 3.140625 | 3 | [] | no_license | CREATE TABLE Kayttaja(
id SERIAL PRIMARY KEY,
nimi varchar(50) NOT NULL,
luomispaivamaara DATE NOT NULL,
password varchar(50) NOT NULL
);
CREATE TABLE Alue(
id SERIAL PRIMARY KEY,
nimi varchar(40) NOT NULL
);
CREATE TABLE Ketju(
id SERIAL PRIMARY KEY,
alueId INTEGER REFERENCES Alue(id) NOT NULL,... | true |
d9ba64c2c459be045ce8c43da98b1679d01c8a00 | SQL | AntonioJYuen/SQL-Scripts | /Misc SQL Queries/Membership Overview Exceptions.sql | UTF-8 | 969 | 3.71875 | 4 | [] | no_license | select n.id, join_date, rejoin_date, n.DATE_ADDED, n.PAID_THRU, n.MEMBER_TYPE, n.STATUS
from name n
inner join Demographics d on n.id = d.id
where (cast(JOIN_DATE as date) >= '2016-1-1' or cast(REJOIN_DATE as date) >= '2016-1-1' or cast(DATE_ADDED as date) >= '2016-1-1')
and n.COMPANY_RECORD = 0
and n.status = 'A'
... | true |
e3302c2f7c426092e3273eabef052623cb4441f4 | SQL | IanKarlo/champions-contracts | /Modelo Físico/triggers.sql | UTF-8 | 1,866 | 3.5625 | 4 | [] | no_license | -- Trigger Inseção em Participa
CREATE OR REPLACE TRIGGER INSERCAO_PARTICIPA BEFORE INSERT ON PARTICIPA FOR EACH ROW DECLARE
cntr_total NUMBER(1) := 0;
cntr_time NUMBER(1) := 0;
is_in NUMBER(1) := 0;
BEGIN
FOR reg_pXp IN
(SELECT *
FROM PARTIDA P1 INNER JOIN PARTICIPA P2 ON P1.CODIGO = P2... | true |
95fad8aa53f430672ed9de095415d1806ecd553b | SQL | virtyaluk/leetcode | /problems/1285/solution.sql | UTF-8 | 278 | 3.59375 | 4 | [] | no_license | # Write your MySQL query statement below
with tmp as (
select
log_id,
(log_id - row_number() over(order by log_id)) as ind
from
Logs
)
select
min(log_id) as start_id,
max(log_id) as end_id
from
tmp
group by
ind
order by
1 asc | true |
db88b83c1d3512ef6a9fd7ed0c21457a13e54949 | SQL | nathaniel-mohr/undergrad_coursework | /CS340/program1.sql | UTF-8 | 2,921 | 4.375 | 4 | [] | no_license | -- 1.
CREATE TABLE DEPT_STATS(
`Dnumber` int(2) NOT NULL,
`Emp_count` int(11) NOT NULL,
`Avg_salary` decimal(10,2) NOT NULL,
PRIMARY KEY (`Dnumber`)
);
-- 2.
DELIMITER $$
CREATE PROCEDURE InitDeptStats ()
BEGIN
INSERT INTO DEPT_STATS
SELECT Dno, COUNT(SSn) "Number of Employees", AVG(Salary) "Av... | true |
c7b5744690b314a868a3692bbc6a7b52472212f5 | SQL | damiith/Web-Project | /common/zerotohero.sql | UTF-8 | 2,306 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 14, 2021 at 11:21 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
e023395a545133d131db4cbbeec2da95381080cc | SQL | dato7898/topjavaGraduation | /src/main/resources/db/populateDB.sql | UTF-8 | 1,059 | 3.3125 | 3 | [] | no_license | DELETE FROM votes;
DELETE FROM user_roles;
DELETE FROM lunch;
DELETE FROM users;
ALTER SEQUENCE global_seq RESTART WITH 100000;
INSERT INTO users (name, email, password) VALUES
('User', 'user@yandex.ru', 'password'),
('Admin', 'admin@gmail.com', 'admin');
INSERT INTO user_roles (role, user_id) VALUES
('ROLE_USE... | true |
ecb468393b7f8f9c135267d194751a90a6ceba8d | SQL | nedhir6/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/100-not_my_genres.sql | UTF-8 | 339 | 3.96875 | 4 | [] | no_license | -- list all genres not linked to dexter
SELECT tv_genres.name
FROM tv_genres
WHERE tv_genres.id NOT IN
( SELECT tv_show_genres.genre_id FROM tv_show_genres
JOIN tv_shows ON tv_show_genres.show_id = tv_shows.id
JOIN tv_genres ON tv_show_genres.genre_id = tv_genres.id
WHERE tv_shows.title = 'Dexter')
GROUP BY name
ORDER ... | true |
d6eea8c0e09af4ca457c4abe1dcdcd02c3edb3fe | SQL | thangduong3010/PL-SQL | /Practice/Practice2.sql | UTF-8 | 2,297 | 3.53125 | 4 | [] | no_license | /* Finally fixed */
SET SERVEROUTPUT ON
DECLARE
v_locid HR.LOCATIONS.COUNTRY_ID%TYPE;
v_message VARCHAR2 (50);
v_mess VARCHAR2 (60)
:= 'Ok, you can visit the following states/provinces:';
v_counter NUMBER (2);
TYPE state_type_table IS TABLE OF HR.LOCATIONS.STATE... | true |
4e463bbd4fcba52ce1aaec249ca1db43716da63b | SQL | liangzhuo1/projrct | /sql脚本/leadnews_user.sql | UTF-8 | 19,688 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE IF NOT EXISTS leadnews_user DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE leadnews_user;
SET NAMES utf8;
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50726
Source Host : localhost:3306
Source Database : leadnews_user
Target Se... | true |
b27f2de54988061e79bd059cff00e4ab18ea9772 | SQL | gsomic89/SE452_Hotel_Reservation_Systems | /hotelreservationsystem/src/main/resources/schema-postgresql.sql | UTF-8 | 2,111 | 3.890625 | 4 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS PAYMENT;
DROP TABLE IF EXISTS RESERVATIONS;
DROP TABLE IF EXISTS ROOMS;
DROP TABLE IF EXISTS ROOM_TYPES;
DROP TABLE IF EXISTS HOTELS;
DROP TABLE IF EXISTS LOCATIONS;
DROP TABLE IF EXISTS USERS;
create table USERS (
-- ID = UserID
ID int generated by default as identity not null,
USERNAME va... | true |
0fa06a294b9ac7ae04d8d29f08ed5e6e06a6e527 | SQL | denisablajan/ProiectLS_Tema6 | /users.sql | UTF-8 | 2,345 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 22, 2021 at 09:51 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
372fb47ef04c52eb7893bface4a68b7ff96a86a1 | SQL | OverStache/projekDSS | /dss.sql | UTF-8 | 3,248 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 29, 2021 at 12:43 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
ac8d1f3f590c60447907f6d2264550ce6f199d65 | SQL | Kahaldrogo/Homic | /projet.sql | UTF-8 | 3,020 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : jeu. 25 avr. 2019 à 23:34
-- Version du serveur : 10.1.37-MariaDB
-- Version de PHP : 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
32237d17445448890550d1912d697867aa960c46 | SQL | veeteeran/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/16-shows_by_genre.sql | UTF-8 | 301 | 3.859375 | 4 | [] | no_license | -- lists all shows, and all genres linked to that show in hbtn_0d_tvshows
SELECT tv_shows.title, tv_genres.name
FROM tv_show_genres
RIGHT JOIN tv_shows
ON tv_show_genres.show_id = tv_shows.id
LEFT JOIN tv_genres
ON tv_show_genres.genre_id = tv_genres.id
ORDER BY tv_shows.title, tv_genres.name;
| true |
deeaaaa87ea15f60f4582a4007a4db84c08eb2e4 | SQL | SebastianBienert/AdvancedDatabase | /SQL_SCRIPTS/zestaw2/zestaw2_6.sql | UTF-8 | 736 | 3.8125 | 4 | [
"MIT"
] | permissive | DELETE FROM INVOICELINE
WHERE INVOICELINE.INVOICELINEID IN
(
SELECT INVOICELINE.INVOICELINEID FROM INVOICELINE
INNER JOIN TRACK
ON TRACK.TRACKID = INVOICELINE.TRACKID
INNER JOIN (SELECT GENREID FROM GENRE WHERE GENREID = 3) DT0
ON TRACK.GENREID = DT0.GENREID
INNER JOIN (
SELECT INVOICE.INVOICEID, INVOICE.CUSTOMERI... | true |
215e1ac17893fdbe0a9fb10de772215819c7cb98 | SQL | sartoz/SOposts | /CSharp/EntityFramework/FirebirdEncoding/database/Script.sql | UTF-8 | 251 | 2.859375 | 3 | [] | no_license | CREATE TABLE PRODUCTS (
ID INTEGER NOT NULL,
NAME VARCHAR(255) NOT NULL
)
ALTER TABLE PRODUCTS ADD CONSTRAINT PK_PRODUCTS PRIMARY KEY (ID);
INSERT INTO PRODUCTS(ID, NAME) VALUES(1, 'This text contains special characters: é ç ã á à í'); | true |
94af70eee6d5b332164860da1487a86895b49aae | SQL | cbarca/VectorH-sigmod2016 | /hive/queries/q21.sql | UTF-8 | 2,244 | 4 | 4 | [] | no_license | !echo ============================== Q21 START ====================================;
EXPLAIN
select
s_name,
count(*) as numwait
from
supplier,
lineitem l1 left outer join (
select l_orderkey, max(l_suppkey) as max_lsuppkey, count(l_suppkey) as count_lsuppkey
from lineitem
group ... | true |
9d7d11beddb6f035e9641e743f65ae7ffd3b6d1c | SQL | azdadanass/salma | /ws/sql/changes.sql | UTF-8 | 144,754 | 3.109375 | 3 | [] | no_license | update company set count_files = COALESCE ((select count(*) from company_file where company_idcompany = idcompany),0);
update bu set count_files = COALESCE ((select count(*) from bu_file where bu_idbu = idbu),0);
update lob set count_files = COALESCE ((select count(*) from lob_file where lob_idlob = idlob),0);
updat... | true |
5c48f89ab379ea6b7f0a0e1478548c5c8e36bcb9 | SQL | faiuwle/ConlangDictionary | /schema.sql | UTF-8 | 23,050 | 4.03125 | 4 | [] | no_license | -- Special Note: Don't mess with this file; in particular, all the SQL statements
-- must have a blank line after them, or my rather stupid parsing loop will barf.
-- Statements for initializing a new dictionary:
-- Dictionary-specific settings, including database version
create table Settings
(name text pri... | true |
6f539be8b48f1c4e639af090b087beeeb86815b5 | SQL | Mishakaveli1994/SQL_Excercises_Courses_Exams | /Excercises Triggers And Transactions/3_Deposit Money.sql | UTF-8 | 501 | 3.296875 | 3 | [] | no_license | CREATE OR ALTER PROCEDURE usp_DepositMoney (@AccountId INT, @MoneyAmount DECIMAL (15,4))
AS
IF (SELECT COUNT(*) FROM Accounts WHERE Id = @AccountId) != 1
THROW 50000, 'The specified account does not exist!.' , 1;
IF @MoneyAmount < 0
THROW 50001, 'The specified money amount is invalid!.' , 1;
UPDATE Accounts
S... | true |
13f11eb5480b8af28a30799d29ee351a8244fa59 | SQL | svalecillos/SistemaPersonas | /db_personas.sql | UTF-8 | 1,728 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-10-2018 a las 23:17:47
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 7.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
a97cf449e66471c3198917df4aa052811c987ed4 | SQL | lee-jung-beom/SQL | /sql/2021_03_15.sql | UTF-8 | 6,790 | 4.59375 | 5 | [] | no_license | --입사 일자가 1982년 1월 1일 이후인 모든 직원 조회하는 SELECT 쿼리를 작성하시오.
SELECT * FROM emp WHERE hiredate >= TO_DATE('19820101', 'RRRRMMDD');
--"숫자 > 숫자" 비교도 가능하고, "날짜 > 날짜" 비교도 가능하다. (예시)2020-03-15 > 2021 - 03 -12
-- 년도를 표기 할 때 YYYY 또는 RRRR 4 자리로 표기하는 것을 추천(년도 표기의 확실성을 위해서)
SELECT * FROM emp;
SELECT * FROM emp WHERE sal > 1500 AND hi... | true |
f1a7bbce15e3ddc8d304fca3b58f68e95efccd34 | SQL | huangpuyuan/php_info_test | /sql/hk_exhibition.sql | UTF-8 | 4,388 | 2.703125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : Zt
Source Server Version : 50717
Source Host : 113.106.87.19:3306
Source Database : hksh
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-05-08 15:55:51
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... | true |
2c814460e6f82787a1fc8dc571654cf9f6630bd6 | SQL | Splintermail/splintermail-client | /server/migrations/004-uuids.dn.sql | UTF-8 | 2,111 | 3.734375 | 4 | [
"Unlicense"
] | permissive | -- choose old-style column ids via auto_increment
create table temp (
user_id int auto_increment,
user_uuid binary(32) not null,
primary key (user_id)
);
insert into temp (user_uuid) select x.user_uuid from (
select user_uuid from accounts
) as x;
-- add user_id column to tables
alter table accounts ad... | true |
1362104c3a5460e36b702a878c33e897f7803799 | SQL | juniorasmat22/indicadores | /recursos/sql/sp/sp_empresa_crud.sql | UTF-8 | 1,628 | 4.125 | 4 | [] | no_license | use enfermeriaunt;
DELIMITER $$
DROP procedure if exists sp_empresa_crud $$
CREATE PROCEDURE sp_empresa_crud(
idEmpresa int,
idUsuario int,
nombre varchar(100),
ruc varchar(20),
rubro varchar(200),
estado int,
opcion int,
pagina int
)
BEGIN
declare registrosPagina int;
declare limiteInferior int;
... | true |
de47a91cec55c2f9fac9e9e2df0f1e069dcdff90 | SQL | fabio97U/querys | /Inscripcion/PagoDeAranceles_Inscripcion.sql | UTF-8 | 2,544 | 3.984375 | 4 | [] | no_license | select * from ra_ins_inscripcion where ins_codper = 173322 and ins_codcil = 125
select * from ra_mai_mat_inscritas where mai_codins = 1234923
--update ra_validaciones_globales set rvg_mensaje = '0' where rvg_codper = 173322
select * from col_tmo_tipo_movimiento where tmo_arancel in ('C-09', 'R-03', 'A-03');
--3 A-03 ... | true |
a010d754f1eb15ab210bb62f61fd7d40df354eb5 | SQL | artthurnunes/contratosVsCode | /documentacoes/Estrutura banco ORACLE/Scripts_BD.sql | UTF-8 | 813 | 3.046875 | 3 | [] | no_license | CREATE TABLE USUARIOS (CD_USUARIO VARCHAR2(30) NOT NULL
,NM_USUARIO VARCHAR2(40) NOT NULL
,DS_OBSERVACAO VARCHAR2(2000)
,CD_SENHA VARCHAR2(30) NOT NULL
,SN_SENHA_PLOGIN NUMBER(1,0)
,PRIMARY KEY (CD_USUARIO)
);
TRUNCATE TABLE USUARIOS;
DROP TABLE USUARIOS;
INSERT ... | true |
63002895ed28caa290ea577d0fcd9ce7e4d48cfe | SQL | recharbao/sql | /牛客训练1/查找所有员工的last_name和first_name/code.sql | UTF-8 | 100 | 2.828125 | 3 | [] | no_license | SELECT last_name, first_name, dept_no
FROM employees e
LEFT JOIN dept_emp d
ON e.emp_no = d.emp_no;
| true |
06a74d792bf16febcb04b58ea22c6f5209059790 | SQL | sujunhao/Medicine_GO | /create_medicine_database.sql | UTF-8 | 287 | 2.6875 | 3 | [] | no_license | ##create database
create database medicine;
##create a user name=mdc pw=mdc123
GRANT usage on medicine.* to mdc identified by 'mdc123';
##grant previleges
GRANT select, insert, update, delete, index, alter, create, drop on medicine.* to mdc;
##pw is mdc123
##mysql -u mdc -p -D medicine | true |
d26643eca34be89526cfcbf4a341428f1ab0f92d | SQL | folad009/medium-clone-1 | /db/addCommentClap.sql | UTF-8 | 226 | 3.1875 | 3 | [] | no_license | UPDATE comments SET claps = $1 WHERE id = $2;
SELECT u.id as userid, u.firstname, u.lastname,u.avatar,c.id, c.body, c.time,c.claps FROM users AS u JOIN comments AS c ON u.id = c.userid WHERE c.postid = $3 ORDER BY c.id DESC; | true |
06c8d99069346d2260c7d94ff32f872f81c2a28b | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day14/select1129.sql | UTF-8 | 262 | 2.9375 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['3013','2204','2100_4','3226','4221','5216','4086','4059','3048','2214'])
| true |
b1d335c0d77553f1990775f47c40cb9932410a35 | SQL | chunliyu/corrective-commit-probability | /code/queries/coupling_validation_by_lang.sql | UTF-8 | 2,273 | 4.15625 | 4 | [] | no_license | drop table if exists ccp.active_2019_files_coupling;
create table ccp.active_2019_files_coupling
as
select f.repo_name as repo_name
, file
, count(distinct f.commit) as commits
, count(distinct case when REGEXP_CONTAINS( message, 'coupling|coupled') then f.commit else null end) as commits_with_coupling
, 1.0*c... | true |
4ef0a5191c1784857a5fcfdeba0c85e0308f6703 | SQL | eltercera/WINERY | /sql/insert_bodega_marca_emilia.sql | UTF-8 | 3,450 | 2.890625 | 3 | [] | no_license | select pai_id as id_pais from pais where upper(pai_nombre) = 'ITALIA' \gset
/* Bonfiglio */
insert into productor (Pro_Nombre,Pro_Dir_General) values
(
'Giovanni Fraulini',
direcciongeneral('Via Cassola 21 - 40053 Valsamoggia loc. Monteveglio Bologna, Emilia Romagna, Italia','http://www.bonfigliovini.it','frauli... | true |
bfafc050c60e27019c82e08aa49fee83434fff35 | SQL | ookura-mf/kanban_api | /db/migrations/20200704233549_add_task_table.sql | UTF-8 | 558 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | -- +goose Up
-- SQL in this section is executed when the migration is applied.
CREATE TABLE tasks (
id int NOT NULL AUTO_INCREMENT,
kanban_id int NOT NULL,
title varchar(255) NOT NULL,
content text,
status int NOT NULL DEFAULT 1 COMMENT '1: todo, 2: doing, 3: done',
created_at datetime,
upda... | true |
8335487774b1a61c1e788cb1974a0944f06b75df | SQL | MykolaAlias/nv-message-list.com | /nv-message-list.sql | UTF-8 | 4,270 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Июн 05 2017 г., 21:32
-- Версия сервера: 5.7.18-0ubuntu0.17.04.1
-- Версия PHP: 7.1.5-1+deb.sury.org~zesty+2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
24afc841ad2a1aa9f0033f6d29ed04878e5e9ac4 | SQL | Tamamasheer0/Bootcamp_Homework | /Homework-07-SQL/2019-04-11 - MySQL Homework #7.sql | UTF-8 | 6,784 | 4.75 | 5 | [] | no_license | USE sakila;
-- 1a. Display the First and Last Names of All Actors From the Table 'actor'.
SELECT first_name, last_name
FROM actor;
-- 1b. Display the First and Last Name of Each Actor in a Single Column in Upper Case.
SELECT CONCAT(UPPER(first_name), " ", UPPER(last_name)) as full_name
FROM actor;
-- 2a. You need to ... | true |
491c5fdd6e5a73990e7b53f4424361723c58e46a | SQL | loic-blois-digitech/spring-batch | /src/main/resources/sql/schema.sql | UTF-8 | 484 | 2.640625 | 3 | [] | no_license | --CREATE DATABASE springbatch /*!40100 DEFAULT CHARACTER SET utf8 */;
CREATE SCHEMA IF NOT EXISTS sch_spring_batch;
DROP TABLE IF EXISTS sch_spring_batch.user;
CREATE TABLE sch_spring_batch.user
(
id Integer NOT NULL,
name varchar(45) NOT NULL default '',
PRIMARY KEY (id)
);
INSERT INTO sch_spring_b... | true |
e3e29f9c768a9f430ca01c70021db59f18fb7eae | SQL | tomvantilburg/amsterdam3d | /demo/app/sql_ahn3/bgt_steiger.sql | UTF-8 | 1,630 | 3.6875 | 4 | [
"MIT"
] | permissive | WITH
bounds AS (
SELECT ST_MakeEnvelope(_west, _south, _east, _north, 28992) geom
),
pointcloud_ground AS (
SELECT PC_FilterGreaterThan(
PC_FilterEquals(
PC_FilterEquals(pa,'classification',1),
'NumberOfReturns',1),
'Intensity',150) pa --unclassified points
FROM ahn3_pointcloud.patches, bounds
WHERE ST_... | true |
b745fbf0e9436450059e020196edadb6f2541cef | SQL | ImagingDataCommons/IDC-WebApp | /etl/sql/segmentations_pivot_builder.sql | UTF-8 | 3,435 | 3.21875 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | -- sct_to_srt_map = idc-dev-etl.smp_scratch.sct_to_srt_map
WITH ars AS (
SELECT PatientID, SOPInstanceUID,
COALESCE(CAST(map.Concept_ID__SCT_ AS STRING),
segs.AnatomicRegion.CodeValue) AS AnatomicRegionSequence,
segs.AnatomicRegion.CodeMeaning AS AnatomicRegion,
FrameOfReferenceUID,
SegmentNumber,
SegmentAlgor... | true |
829cda155c589218b32e85dbcb1f8fd1f23f6a54 | SQL | nmcintyre/ibotta-big-data | /task3/analysis-postgresql.sql | UTF-8 | 8,481 | 4.1875 | 4 | [] | no_license | -----
-----
----- Seasonal trends
----- requests most frequent on weekdays for top 5 occurring events
-----
-----
SELECT case_summary, EXTRACT(DOW FROM case_created_dttm) AS dow, COUNT(*)
FROM service_requests
WHERE case_summary IN
(
SELECT case_summary
FROM
(
SELECT case_summary, DENSE_RANK() ... | true |
cca33e24d8c8970bae87985486d69fafcf4d7e53 | SQL | RamesesDev/ETRACS2 | /etracs2-tc/tc2-services/services.jar/tc-services.jar/META-INF/sql/iraf.sql | UTF-8 | 2,596 | 3.4375 | 3 | [] | no_license | [getList]
SELECT o.* FROM iraf o WHERE docstate = 'DRAFT' ORDER BY o.txnno
[getListByRivno]
SELECT o.* FROM iraf o WHERE o.rivno LIKE $P{rivno}
[getIrafByTxnno]
SELECT o.* FROM iraf o
WHERE o.txnno LIKE $P{txnno}
[getDraftIrafByRivId]
SELECT o.* FROM iraf o
WHERE o.rivid = $P{rivid}
AND o.docstate = 'DRAFT'... | true |
a0675dedefcb56f9b9864f93574692f43a4e9c2f | SQL | wikiteams/gh-torrent-queries | /commits-network/export_table_2_csv.sql | UTF-8 | 316 | 2.765625 | 3 | [
"Unlicense"
] | permissive | desc dev_project_commits;
select count(*) from dev_project_commits; -- 140290
SELECT
*
FROM
dev_project_commits
INTO OUTFILE '/tmp/user2user-by-commits.csv'
FIELDS OPTIONALLY ENCLOSED BY '"'
TERMINATED BY ','
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
-- 140290 row(s) affected | true |
f819b58f69933a5ea1b9bf88bb30e4383124299e | SQL | connormcd/misc-scripts | /sql/sesswait_grabber.sql | UTF-8 | 1,213 | 3 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | -------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------------
set serverout on size 999999
declare
typ... | true |
61956dbdfbd1d6451bcc139036e7b6d838593560 | SQL | safrr/tasks | /task4/StatisticsByEthnicity.sql | UTF-8 | 3,015 | 4.5625 | 5 | [] | no_license | ;WITH CTE_STOP_BY_OUTCOME AS
( SELECT DISTINCT *,
(COUNT(*) OVER(PARTITION BY "ss_officer_defined_ethnicity", ss_outcome)) AS stops_by_ethicity_and_outcome,
(COUNT(*) OVER(PARTITION BY "ss_officer_defined_ethnicity")) AS "Stops by ethnicity",
... | true |
927d2ff646c9575b214f35b36bf01f412f58f4c1 | SQL | gnexeng/FittsLaw | /seed.sql | UTF-8 | 3,162 | 3.125 | 3 | [] | no_license |
-- -----------------------------------------------------
-- Table `participants`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `participants` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
`age` INTEGER NULL,
`gender` VARCHAR(45) NULL,
`handedness` TINYINT NU... | true |
8103e59ddda01ae3bb34eb9d8c2553cc33f7734f | SQL | PatricePeace/Chorusbook | /Script_Insert_BD_Version_3.sql | UTF-8 | 12,525 | 2.6875 | 3 | [] | no_license | DELETE FROM est_au_programme;
DELETE FROM participe;
DELETE FROM responsabilite;
DELETE FROM utilisateur;
DELETE FROM choriste;
DELETE FROM inscription;
DELETE FROM Voix;
DELETE FROM StatutOeuvre;
DELETE FROM TypeEvt;
DELETE FROM evenement;
DELETE FROM style;
DELETE FROM oeuvre;
INSERT INTO Voix(typeVoix)
VALUES ('... | true |
b272978b7b217434cd0df48de3dbb1199d0b340e | SQL | propublica/ilcampaigncash | /sql/views/Receipts.sql | UTF-8 | 1,115 | 3.125 | 3 | [
"MIT"
] | permissive | CREATE TABLE public.receipts
AS
SELECT
id as id,
committeeid as committee_id,
fileddocid as filed_doc_id,
etransid as etrans_id,
lastonlyname as last_name,
firstname as first_name,
rcvdate as received_date,
amount as amount,
aggregateamount as aggregate_amount,
loanamount as lo... | true |
725ababb42ed6dff9e9f4265be77edea39e4b4aa | SQL | robertocuyar/database-exercises | /random.sql | UTF-8 | 112 | 3.0625 | 3 | [] | no_license | SELECT user_email as 'Email'
FROM users as u
JOIN ads as a ON a.users_id = u.id
WHERE a.title = #GIVEN AD title; | true |
503b61f7e3a4faeb2e671883f1296ef3469e85d6 | SQL | jtsai972/burger | /db/schema.sql | UTF-8 | 420 | 3.03125 | 3 | [] | no_license | DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers(
id INT NOT NULL AUTO_INCREMENT,
burger_name VARCHAR(100) NOT NULL,
devoured tinyint NOT NULL DEFAULT 0,
-- isRated tinyint NOT NULL DEFAULT 0,
-- rating tinyint NULL,
-- isReviewed tinyint ... | true |
1da618d5bee9d99f6c4642c5e4f1ec3b3f443bf6 | SQL | CUBRID/cubrid-testcases | /sql/_01_object/_09_partition/_001_create/cases/1184.sql | UTF-8 | 516 | 3.578125 | 4 | [
"BSD-3-Clause"
] | permissive | -- create table of list partition on string field that using to_date function and query all partitions
CREATE TABLE za (
store_id string
)
PARTITION BY list(to_timestamp(store_id)) (
partition p0 values in ('1999-01-01', '1999-02-01','1999-03-01'),
partition p1 values in (null,'2002-01-01','2002-02-01','2002-03-01... | true |
6ff59d3ce2060c1c34332ea8d64d446bab52c4c4 | SQL | salvajih/LSC-Grants | /Easygrants_Web_LSC/Easygrants_Web_LSC/DBScripts/Build 2014.x/Build 2014.09/05_Create_vLSC_PRO_BONO_PRIMARY_SCORE_BY_SUBCATEGORY.sql | UTF-8 | 529 | 3.203125 | 3 | [] | no_license | CREATE VIEW vLSC_PRO_BONO_PRIMARY_SCORE_BY_SUBCATEGORY
AS
SELECT pbrs.lsc_pro_bono_review_score_id
,pbrs.wf_task_assignment_id
,pbrs.lsc_pro_bono_subcategory_id
,pbrs.lsc_pro_bono_review_score_lkp_id
,apbs.score_value raw_score
,pbs.weighting
,apbs.score_value*pbs.weighting/100.0 weighted_score
,pbrs.comment
... | true |
c4321f5a11d91cf3e97ce05174709b098275c939 | SQL | subarna007/ALL-IN-ONE-Hotel | /db/hotel_management_system.sql | UTF-8 | 4,116 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 22, 2020 at 10:28 PM
-- Server version: 10.1.22-MariaDB
-- PHP Version: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
8f742752883d7fa322255e2e302d0125b24b253b | SQL | Kminseokk/SQL-Oracle_210825 | /STUDY210825.sql | UTF-8 | 2,689 | 3.984375 | 4 | [] | no_license | --일반적인 아우터 조인 쿼리
select emp_id, emp_name, gender, age, hire_date, d.dept_id, dept_name
from emp_master e, dept_master d
where e.dept_id = d.dept_id(+)
--스칼라 서브쿼리
select emp_id, emp_name, gender, age, hire_date, dept_id,
(select dept_name from dept_master d where e.dept_id = d.dept_id) as dept_name
from emp_mas... | true |
9bb687534675acc8d7bff3266422eee2203eb019 | SQL | CypressG/praktika_2 | /praktika.sql | UTF-8 | 1,543 | 3.453125 | 3 | [] | no_license | CREATE TABLE Groups(
group_name TEXT PRIMARY KEY,
description TEXT
);
CREATE TABLE Users(
first_name TEXT,
last_name TEXT,
role TEXT,
username TEXT PRIMARY KEY,
password TEXT,
FK_group TEXT,
FOREIGN K... | true |
7e49dd77d1f655ad235972bad170aec28138e451 | SQL | phpsong/DeviceManagementSystem | /backend/data/sauce_2015-03-20.sql | UTF-8 | 7,543 | 2.890625 | 3 | [
"BSD-3-Clause"
] | permissive | # ************************************************************
# Sequel Pro SQL dump
# Version 4135
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.5.38)
# Database: sauce
# Generation Time: 2015-05-27 11:40:25 +0000
# ***************************************************... | true |
91ffbac3016ea73eca11b2f2b7e0640f38687a9e | SQL | PantsuDango/chat | /src/db/create_tables.sql | UTF-8 | 3,116 | 3.8125 | 4 | [] | no_license | CREATE DATABASE `chat_db`;
USE `chat_db`;
-- 聊天消息记录表
CREATE TABLE `chat_message` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` varchar(32) NOT NULL COMMENT 'IP地址',
`message` text NOT NULL COMMENT '聊天消息',
`message_type` enum('First', 'Option', 'Manual', 'Keyword', 'Customer') NOT NULL COMMENT '消息类型: 首次/质... | true |
34120a94ecc735781128286f0440fdec9713c8a7 | SQL | aniquaTabassum/Distributed-Database | /Monopoly/Host/main.sql | UTF-8 | 311 | 3.015625 | 3 | [] | no_license | SET SERVEROUTPUT ON;
DECLARE
chance_index NUMBER(2);
BEGIN
FOR Lcntr IN 1..10
LOOP
chance_index := dbms_random.value(1,6);
FOR t IN (SELECT cid, action FROM chance_cards where cid = chance_index)
LOOP
dbms_output.put_line(t.cid || '. ' || t.action);
END LOOP;
END LOOP;
END;
/ | true |
03408185d167dc7b6179aabd3da8db6655d2de50 | SQL | ModruKinstealer/CS50ProblemSets | /week 7/pset 7: movies/8.sql | UTF-8 | 332 | 3.796875 | 4 | [] | no_license | SElECT name
FROM people
WHERE id
/* Pull list of stars using the ID we get from the title sub-query*/
IN (SELECT person_id
FROM stars
/* Pull id of movie using title */
WHERE movie_id = (SElECT id
FROM movies
WHERE title = "T... | true |
c328e9b0e1de07d70cc5f961015cc46237aceeac | SQL | JcGaara/SGA-PLSQL-OPE | /SGA-OPERACION/Scripts/PROY_20152_Script_ope_prmt_sa.sql | UTF-8 | 2,495 | 2.6875 | 3 | [] | no_license | declare
ln_count_val number;
begin
-- Agregando comentario en tabla
-- validando la insercion del parametro del shell de cierre de sot
select count(1)
into ln_count_val
from operacion.opedd
where codigoc = 'CONAX_SRV'
and tipopedd = (select tipopedd
from operacion.tipopedd... | true |
61efd394903dacb283fe532c26872a01925b1f4b | SQL | julianexpertz/uas | /blog(1).sql | UTF-8 | 2,228 | 3.3125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 13 Bulan Mei 2019 pada 04.36
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
c25afa43833dec4cbaec4f8a50ae92324d7bdb09 | SQL | LidiaHammer/CR10-CEKIC-BigLibrary | /DB/CR10-CEKIC-BigLibrary.sql | UTF-8 | 4,688 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Erstellungszeit: 13. Nov 2020 um 20:07
-- Server-Version: 10.4.14-MariaDB
-- PHP-Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
b1f0d6337502ff5d18d0ee0cb8c2e5b72bbf70e7 | SQL | bcdasilv/concerntagger_extension | /ConcernTagger_fromJar/sql/concerntagger.sql | UTF-8 | 4,327 | 3.765625 | 4 | [] | no_license | DROP TABLE CONCERN_COMPONENT_EDGE IF EXISTS;
DROP TABLE CONCERN_EDGE IF EXISTS;
DROP TABLE COMPONENT_EDGE IF EXISTS;
DROP TABLE COMPONENT_DOMAIN IF EXISTS;
DROP TABLE COMPONENT IF EXISTS;
DROP TABLE COMPONENT_KIND IF EXISTS;
DROP TABLE EDGE_KIND IF EXISTS;
DROP TABLE CONCERN_DOMAIN IF EXISTS;
DROP TABLE CONCERN IF EXIS... | true |
b8799ac48fab5ea53b4ecc49e03c11f5d0978f19 | SQL | caiquebatistam/MySQL | /outros/exemplo_loja_softwares.sql | UTF-8 | 1,945 | 3.859375 | 4 | [] | no_license | CREATE DATABASE db_informatica;
USE db_informatica;
CREATE TABLE tb_categoria(
id bigint auto_increment,
descricao varchar(255),
primary key (id)
);
insert into tb_categoria (descricao) values ("Sistema Operacional");
insert into tb_categoria (descricao) values ("Pacote Office");
insert into tb_categoria (d... | true |
c75727e63d76747fd46000e623cbfc03fef602b5 | SQL | vanshg395/hunt_portal | /sql/hunt2.sql | UTF-8 | 13,938 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.7
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Dec 23, 2016 at 09:26 AM
-- Server version: 10.1.18-MariaDB-cll-lve
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... | true |
9e1ab91223026600eb36c886adb64f41e73fd9ed | SQL | dennischancs/advanced-sql-tutorial | /Ch1(1-4)/CreateTable/Students.sql | GB18030 | 590 | 3.15625 | 3 | [] | no_license | /* ѯNULLļ */
CREATE TABLE Students2
(student_id INTEGER PRIMARY KEY,
dpt VARCHAR(16) NOT NULL,
sbmt_date DATE);
INSERT INTO Students2 VALUES(100, 'ѧԺ', '2005-10-10');
INSERT INTO Students2 VALUES(101, 'ѧԺ', '2005-09-22');
INSERT INTO Students2 VALUES(102, 'ѧԺ', NULL);
INSERT INTO Students2 VAL... | true |
f35f2aa63af843d67dd8a3a233dbd581dc7094eb | SQL | seltonGitHub/hwrtepms | /src/main/sql/elecsystem.sql | UTF-8 | 52,993 | 3.3125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50622
Source Host : localhost:3306
Source Database : elecsystem
Target Server Type : MYSQL
Target Server Version : 50622
File Encoding : 65001
Date: 2019-06-30 22:33:55
*/
SET FORE... | true |
49e55927fa5870d1f05b20d1197c9543779aefcf | SQL | amelaye/masuperboutique | /bdd.sql | UTF-8 | 12,201 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jul 19, 2019 at 05:14 PM
-- Server version: 5.7.21
-- PHP Version: 7.1.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `mydb`
--
-- ------------------------------... | true |
937c5855d15a1c61cf7c6e6d1db58c27a01eb89b | SQL | nss-day-cohort-44/chinook-dalamcd | /sales_agent_customer_count.sql | UTF-8 | 158 | 3.625 | 4 | [] | no_license | SELECT
e.FirstName || ' ' || e.LastName as FullName,
COUNT(c.SupportRepId)
FROM Employee e
JOIN Customer c ON c.SupportRepId = e.EmployeeId
GROUP BY FullName; | true |
7fb29efccb28444c76494104a92ea8cdcda4ae8c | SQL | DataViva/dataviva-etl | /secex/extract/select/Recodificacao_HS/2006/Recodificacao_hs_06.sql | UTF-8 | 582 | 3.03125 | 3 | [] | no_license | use dataviva_raw;
-- Recodificando HS1996 para HS2007:
select distinct CO_SH4 from SECEX_2006_EXP;
select distinct CO_SH4 from SECEX_2006_IMP;
-- Conforme resultado do R, apenas os codigos 9991, 9992, 9997 e 9998 não aparecem na lista de hs 2007, e devem ser recodificados
create table SECEX_2006_EXP_STEP1 select * ... | true |
1f1028c003994e42b307ab4327e612af2ca06d3d | SQL | Bogdanp/koyo | /koyo-lib/koyo/job/queries/unregister-stale-workers.sql | UTF-8 | 286 | 3.15625 | 3 | [
"BSD-3-Clause"
] | permissive | WITH
stale_workers AS (
DELETE FROM
koyo_workers
WHERE
heartbeat < CURRENT_TIMESTAMP - INTERVAL '15 minutes'
RETURNING
id
)
UPDATE
koyo_jobs j
SET
status = 'ready'
FROM
stale_workers sw
WHERE
j.status = 'running'
AND j.worker_id = sw.id;
| true |
826f3ce6fb61ac6fee44f2bf845e3fe147c91670 | SQL | mdhcodes/bamazon | /bamazon.sql | UTF-8 | 1,629 | 3.109375 | 3 | [] | no_license | CREATE DATABASE `bamazon_db`;
USE `bamazon_db`;
CREATE TABLE `products` (
`id` INTEGER(10) AUTO_INCREMENT,
`item_id` VARCHAR(100) NULL,
`product_name` VARCHAR(100) NULL,
`department_name` VARCHAR(100) NULL,
`price` INTEGER(10) NULL
`stock_quantity` INTEGER(10) NULL
PRIMARY KEY (id)
);
INSERT INTO `prod... | true |
b26bccd71f902d532fc3fada6b1b1576181d93ed | SQL | nss-day-cohort-44/chinook--leo-rondeau | /sales_per_country.sql | UTF-8 | 198 | 3.34375 | 3 | [] | no_license | --22 Provide a query that shows the total sales per country.
SELECT
"$" || printf("%.2f", SUM(i.total)) AS TotalSales,
i.billingcountry AS Country
FROM invoice i
GROUP BY i.billingcountry | true |
95797a0bce588f01e72695cc077fbe30fcdac4e7 | SQL | omzmarlon/ManagementApp | /play/src/main/resources/evalution/default/3.sql | UTF-8 | 2,628 | 3.3125 | 3 | [] | no_license | # --- !Ups
CREATE TABLE IF NOT EXISTS ItemsComposeQuizes (
quiz_id BIGINT NOT NULL,
item_id BIGINT NOT NULL,
PRIMARY KEY (quiz_id, item_id),
FOREIGN KEY (quiz_id)
REFERENCES Quizes (id)
ON DELETE CASCADE,
FOREIGN KEY (item_id)
REFERENCES QuizItems (id)
ON DELETE CASCADE
);
CREATE TABLE IF NOT EX... | true |
bfb4b434ceb5d6dc192ea040f6e550df7870618c | SQL | prashmohan/SleepProxyService | /traces/burstiness.sql | UTF-8 | 87 | 2.6875 | 3 | [] | no_license | select sum(NProc) from Jobs WHERE SubmitTime >= 0 and NProc > 0 GROUP BY SubmitTime/60; | true |
8a71603fbc9468a5e0ece5f7a1b341062566dbda | SQL | ekofebriharsono/DashboardPresensiOnline | /damartana (1).sql | UTF-8 | 18,525 | 2.671875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 02 Mei 2020 pada 00.28
-- Versi Server: 5.7.19-0ubuntu0.16.04.1
-- PHP Version: 7.2.15-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 ... | true |
75cb15844d185e5b0553b02d3e3726acc94becec | SQL | tcc1996/tea | /app/protected/data/tea.sql | UTF-8 | 3,563 | 3.796875 | 4 | [] | no_license | #奶茶店管理系统数据库
#管理员表
CREATE TABLE IF NOT EXISTS `adminer` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员id',
`adminname` varchar(128) NOT NULL COMMENT '管理员用户名',
`adminnum` varchar(128) NOT NULL COMMENT '管理员账户',
`password` varchar(128) NOT NULL COMMENT 'MD5密码',
`zspassword` varchar(128) NOT NULL CO... | true |
f6c1ea3a12bf7907a4ec592904a145df28cbae82 | SQL | slisette127/Costume | /initialize.sql | UTF-8 | 1,872 | 3.8125 | 4 | [] | no_license | DROP TABLE IF EXISTS Client, Colors, ColorId, Fabric, Notions, Projects;
CREATE TABLE Client (
id INT NOT NULL AUTO_INCREMENT,
ClientId INT NOT NULL,
First_Name VARCHAR(50),
Last_Name VARCHAR(50),
Address VARCHAR(50),
Email VARCHAR(50),
Phone VARCHAR(50),
PRIMARY KEY (id)
);
CREATE TABLE Colors (
i... | true |
d875b0db6e2e8c6f23892c2a271386348a4b15d1 | SQL | TaylorWilliams90/cs313-class | /database.sql | UTF-8 | 705 | 3.203125 | 3 | [] | no_license | CREATE TABLE users (
id SERIAL PRIMARY KEY NOT NULL,
first_name TEXT,
last_name TEXT,
emial TEXT,
password TEXT,
level INTEGER);
CREATE TABLE brand (
id SERIAL PRIMARY KEY NOT NULL,
name TEXT);
CREATE TABLE cars (
id SERIAL PRIMAR... | true |
c4dc23e94c9d5e3a246dc04e54469d76ed2594a7 | SQL | kimseungtae1/datehaeng | /project01/WebContent/sql/meal_review.sql | UTF-8 | 1,075 | 3.046875 | 3 | [] | no_license | create table meal_review(
mrNo number(5) PRIMARY KEY, --[댓글번호]
mrContext varchar2(1000), --댓글내용
mrDate date default sysdate, --댓글 입력시간
mUserid varchar2(10), --회원아이디
mrReadcount number(5) default 0, --글 조회수
mNo number(5) --식당 구분번호(1부터 등록 순서대로)
);
select * from meal_review;
inser... | true |
ad0407b9f5a63bb6ae6a900763101ab378e8a0ab | SQL | Hotel-Dim-Sum/PhotoGallery | /database/PostgreSQL/schema.sql | UTF-8 | 2,773 | 3.125 | 3 | [] | no_license | DROP DATABASE IF EXISTS hotelphotogallery;
CREATE DATABASE hotelphotogallery;
\connect hotelphotogallery;
CREATE TABLE rooms (
room_id serial primary key NOT NULL,
room_name varchar(80) NOT NULL,
city varchar(80) NOT NULL,
state varchar(3) NOT NULL
);
CREATE TABLE roomImages (
image_id serial primary key ... | true |
8a2726b7b94a8d11d5634a994337ddfc1794a875 | SQL | pr-kaspars/myday | /src/main/resources/schema.sql | UTF-8 | 605 | 3.3125 | 3 | [] | no_license | drop table if exists experiment;
drop table if exists reaction;
drop table if exists recognition;
create table experiment(
id serial PRIMARY KEY,
things jsonb
);
create table recognition(
id serial PRIMARY KEY,
message varchar(2000) NOT NULL,
author varchar(128) NOT NULL,
recipien... | true |
42bd8f2380d895386996d625e19f7032bd813958 | SQL | bgacek/obiekt-rekreacyjno-sportowy | /src/main/resources/mysql/schema.sql | UTF-8 | 4,292 | 3.484375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Czas generowania: 05 Gru 2016, 18:02
-- Wersja serwera: 10.1.16-MariaDB
-- Wersja PHP: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Baza danych: `obiekt_rekreacyjno_sportowy`
--
CREATE DATAB... | true |
49bb541081b9ca46825495f75d2773a8671380e3 | SQL | qhit2017/GR1704_01 | /④SQLServer数据库/数据库12.26/四组/王文政2.sql | GB18030 | 1,742 | 4.34375 | 4 | [] | no_license | --1. ѯ"ԭ"ؼʵͼ飬šߡ
SELECT a.bno,a.bname,a.author
from books a
WHERE a.bname LIKE '%ԭ%'
--2. ѯƽ۸
SELECT AVG(b.price) as'ƽ۸'
from books b
--3.ⱾĿΪ20۸Ϊ13.1
update books SET quantity =20
WHERE bname=''
UPDATE books SET price=13.1
where bname=''
SELECT * from books
--4.ѯĿһж
SELECT SUM(c.quantity)
from ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.