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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0b7071724807d26916259978d30420504187ed6d | SQL | dongshunyao/HomeworkManagement | /hwm.sql | UTF-8 | 2,062 | 3.28125 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : hwm
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 65001
Date: 13/03/2020 00:25:24
*... | true |
23792e9ce6c14b61341f2a2f1f0fa4e6e4f4557a | SQL | alperguzel/sql_sakila_homework | /sql_assingment_alper.sql | UTF-8 | 8,778 | 4.625 | 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 letters. Name the column Actor Name.
SELECT CONCAT(first_name, ' ', last_name) AS 'Actor Name' FROM act... | true |
ef6abbf5faf2a9533b1987aafe14a3c8a7a31b8e | SQL | petkoxray/SQL-Course | /Built in Functions/Exercises/03.sql | UTF-8 | 141 | 2.890625 | 3 | [] | no_license | SELECT first_name FROM `employees`
WHERE (department_id = 3 OR department_id = 10)
AND (YEAR(hire_date) > 1994 AND YEAR(hire_date) < 2006)
| true |
3def3b51297e7e575dca23150b55769d98ff8509 | SQL | GerMarS/gmk-user-role-test | /ejemplo_base_de_datos.sql | UTF-8 | 3,144 | 3.03125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-03-2017 a las 20:31:54
-- Versión del servidor: 5.7.14
-- Versión de PHP: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
a44bd197acaf6263a93e77ab8b9efd25a052d9ee | SQL | mindliner/mindliner | /MINDLINER489S/sql/others/Release20/6-addOwnerToClientsTable.sql | UTF-8 | 2,478 | 2.78125 | 3 | [] | no_license | # Add the owner field to the client table
alter table clients add column OWNER_ID int(11) not null;
# Initialize the new field with current owners
UPDATE `mindliner5`.`clients` SET `OWNER_ID`='1' WHERE `ID`='1';
UPDATE `mindliner5`.`clients` SET `OWNER_ID`='1' WHERE `ID`='5';
UPDATE `mindliner5`.`clients` SE... | true |
056804d93973dba21c50b9af9222fa490104900a | SQL | nhochong/ceopro | /application/modules/Ynwiki/settings/my-upgrade-4.01p1-4.01p2.sql | UTF-8 | 2,333 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | UPDATE `engine4_core_modules` SET `version` = '4.01p2' WHERE `name` = 'ynwiki';
INSERT IGNORE INTO `engine4_core_menuitems` (`name`, `module`, `label`, `plugin`, `params`, `menu`, `submenu`, `order`) VALUES
('ynwiki_admin_main_recycle', 'ynwiki', 'Recycle Bin', '', '{"route":"admin_default","module":"ynwiki","contr... | true |
bae41f1f9fb65cc24bae4c9fc8c62b0b01d50ebf | SQL | extremserhat/gfn_documents_fachinformatiker_2021 | /LF_08 Daten systemübergreifend bereitstellen/SQL/040_erdkunde_Aggregatfunktionen.sql | UTF-8 | 1,083 | 3.40625 | 3 | [] | no_license |
-- Aggregatfunktionen
-- Stehen im SELECT
USE erdkunde;
-- MAX(), MIN()
# SELECT MAX(einwohnerzahl) FROM staedte; -- 8.175.133
# SELECT MIN(einwohnerzahl) FROM staedte; -- 479.803
-- COUNT()
# SELECT COUNT(einwohnerzahl) FROM staedte; -- 18
# SELECT COUNT(`name`) FROM staedte; -- 18
# SELE... | true |
1144627370d5a3b5da03deb7b21d9731bf5b3b40 | SQL | FlorianValois/php-sql-save-data | /test-sql.sql | UTF-8 | 1,884 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 10 oct. 2018 à 14:49
-- Version du serveur : 5.7.19
-- Version de PHP : 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
c1b016f5e23e044fec2fb93ba060a6136ffbdc39 | SQL | mr-zero-03/sql-training | /company_database/triggers.sql | UTF-8 | 1,909 | 4.15625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS employee_history (
id INT,
name VARCHAR(40),
sex VARCHAR(15),
status VARCHAR(15),
last_modification DATETIME,
PRIMARY KEY ( id )
);
DELIMITER $$
DROP TRIGGER IF EXISTS on_insert_employee$$
CREATE
TRIGGER on_insert_employee AFTER INSERT
ON employee
FOR EACH ROW BEGIN
IF... | true |
a5967d8f46870f757b6f671d304b213514626d4d | SQL | counsellors/mdb | /look.sql | UTF-8 | 4,042 | 3.296875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : sdb
Source Server Version : 50617
Source Host : localhost:3306
Source Database : look
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2016-02-16 08:38:42
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
98fa5c5a6e8070fdc2aa436d0779ca1b590e743a | SQL | cjonasl/Leander | /Work/Fixzone/ShopDirect/Triggers/TriggerId 5 Forgotten Pwd - Littlewoods.sql | UTF-8 | 1,590 | 3.40625 | 3 | [] | no_license | SELECT
Customer.EMAIL
AS MESSAGESRV_EMLCUSTLFP_HTML_EMAIL,
CustomerEnrolment.EnroleID,
CAST(CustomerEnrolment.EnroleCode AS CHAR(36)) AS EnroleCode,
CustomerEnrolment.CustomerID,
LTRIM(REPLACE(Ltrim(COALESCE(UPPER(LEFT(Customer.TITLE,1))+
LOWER(RIGHT(Customer.TITLE, LEN(Customer.TITLE) - 1)),''... | true |
1fc511b490ec090ca83edb2a91f14eabe0db57d7 | SQL | chandeeland/salido | /database.sql | UTF-8 | 2,145 | 3.953125 | 4 | [] | no_license | CREATE TABLE brands (
id SERIAL PRIMARY KEY,
name varchar(40) NOT NULL
);
CREATE TABLE price_levels (
id SERIAL PRIMARY KEY,
brand_id BIGINT NOT NULL,
name VARCHAR(40) NOT NULL,
CONSTRAINT price_levels_brand_fk FOREIGN KEY (brand_id) REFERENCES brands(id) ON UPDATE CASCADE
);
CREATE TABLE order_types (
... | true |
001bfef463c2fec78c3e49f28d6eb8622fa0318e | SQL | MaxSantolo/booking | /db_pickbooking.sql | UTF-8 | 30,335 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Creato il: Nov 15, 2018 alle 10:34
-- Versione del server: 5.7.22-0ubuntu18.04.1
-- Versione PHP: 7.1.17-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time... | true |
40051d48a35e024d41d037d3f9dd2d0b5238e4d6 | SQL | keerthi1822/keerthikeepgoing | /databasesclass1/homeworkweek1.sql | UTF-8 | 1,039 | 4.21875 | 4 | [] | no_license | select * from task;
select count(title) from task;
select count(title) from task where due_date is null;
select * from status;
select task.title, status.name from
task join status on task.status_id = status.id and status.name like '%done';
select task.title, status.name from
task join status on task.status_id ... | true |
021ec76903aec0f489fa5ede027f1d84553bb4a9 | SQL | azeckoski/az-php-sandbox | /skin/sql/new_db.sql | UTF-8 | 1,820 | 3.78125 | 4 | [] | no_license | // table for storing uploaded files and images
CREATE TABLE skin_files (
pk int(10) NOT NULL AUTO_INCREMENT,
date_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
date_created timestamp NULL,
name VARCHAR(100) NOT NULL,
type VARCHAR(100) NOT NULL,
size INT NOT NULL,
dimensions ... | true |
311d8001b16ee1b277fdf5144ba54b6828087bd7 | SQL | bhaveshbhatkar/REACTJS-REDUX-ES6 | /db/user_table.sql | UTF-8 | 352 | 2.765625 | 3 | [] | no_license | DROP TABLE IF EXISTS USERS;
CREATE TABLE USERS(
user_id int PRIMARY KEY,
role_id int NOT NULL,
supervisor_id NOT NULL,
user_name varchar(100) UNIQUE NOT NULL,
password varchar(200) NOT NULL,
first_name varchar(100),
last_name varchar(100),
email varchar(300) UNIQUE NOT NULL,
created_on timestamp NOT N... | true |
452a13ffb93e6413693949bbb1f69f768d7eb540 | SQL | ReneNyffenegger/about-sqlite | /constraints/primary-key/on-conflict-clauses.sql | UTF-8 | 3,338 | 3.796875 | 4 | [] | no_license | create table tab_on_conflict_abort (id int primary key unique on conflict abort , txt text);
create table tab_on_conflict_fail (id int primary key unique on conflict fail , txt text);
create table tab_on_conflict_ignore (id int primary key unique on conflict ignore , txt text);
create table tab_on_confli... | true |
bb86ff425afb2f391aa3d88bde59737118aaeae1 | SQL | Beit-Hatfutsot/bhp-sql-queries | /familyNames.sql | UTF-8 | 4,281 | 3 | 3 | [] | no_license | --------------------------
----- Family Names ------
--------------------------
with unitFileAttac as
(SELECT UnitFileAttachments.unitid,
FileAttachments.AttachmentFileName,
FileAttachments.AttachmentNum,
FileAttachments.AttachmentPath
FROM FileAttachments with (nolock),
UnitFileAttachments with (nol... | true |
463411e6256cbc0da34a6feeb85eba9dd6a8ffbc | SQL | mithiladas02/pythonwork | /SQL/homework.sql | UTF-8 | 1,327 | 4.09375 | 4 | [] | no_license | USE sakila;
select * from actor;
select first_name,last_name from actor;
---q2--
select CONCAT(`first_name`,' ', `last_name`) AS 'Actor Name' FROM actor;
---q3---
select actor_id,first_name,last_name from actor
where first_name = 'Joe';
----q3---
select * from actor
where last_name LIKE '%GEN%';
---q4--
select * fro... | true |
3f34037b6e5dea6cbdc6f9644ba03c2eeca2bde3 | SQL | oneiromancy/sql-exercises | /select_from_nobel.sql | UTF-8 | 2,856 | 4.46875 | 4 | [] | no_license | -- SECTION: SELECT FROM NOBEL
-- Winners from 1950
-- Question 1: Change the query shown so that it displays Nobel prizes for 1950
SELECT yr, subject, winner FROM nobel
WHERE yr = 1950;
-- 1962 Literature
-- Question 2: Show who won the 1962 prize for Literature
SELECT winner FROM nobel
WHERE yr = 1962 AND su... | true |
c61294694302161b7b3a232956e874afec68f42c | SQL | Meanle/yankaimall | /Install/data/0/wst_goods_gallerys.sql | UTF-8 | 587 | 2.828125 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `wst_goods_gallerys`
-- ----------------------------
DROP TABLE IF EXISTS `wst_goods_gallerys`;
CREATE TABLE `wst_goods_gallerys` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`goodsId` int(11) NOT NULL,
`shopId` int(11) NOT NULL,
`good... | true |
b2640fa73d36cc8c989a4e23f0cdcb3d755df1b2 | SQL | Deepbaran/MySQLNotes | /4_Selecting_From_Table.sql | UTF-8 | 6,548 | 4.59375 | 5 | [] | no_license |
use coffee_store;
-- SELECT STATEMENT --
select * from customers; -- retrieved all the data in our customer table
select last_name from customers; -- retrieved only the last_name column
select last_name, phone_number from customers; -- retieve last_name and phone_number column
-- WHERE CLAUSE --
select * from produc... | true |
5cf43fd462267310debc5e3461a1d858cafe5a9b | SQL | LabKey/ehrModules | /ehr/resources/schemas/dbscripts/sqlserver/ehr_lookups-22.000-22.001.sql | UTF-8 | 639 | 3.546875 | 4 | [] | no_license | ALTER TABLE ehr_lookups.cage ADD Lsid LSIDtype;
ALTER TABLE ehr_lookups.areas ADD Lsid LSIDtype;
CREATE TABLE ehr_lookups.floors (
rowId int identity(1,1),
floor NVARCHAR(100),
building NVARCHAR(100),
name NVARCHAR(100),
description NVARCHAR(100),
created datetime,
createdby integer,
mo... | true |
e182d60f2a48e241d06754473158ea8187aa887d | SQL | jonamuen/sql-reduce | /test/sqlsmith/sqlite/5678.sql | UTF-8 | 819 | 3.5625 | 4 | [
"MIT"
] | permissive | select
case when (1)
and (ref_0.name is NULL) then ref_0.name else ref_0.name end
as c0,
case when 0 then ref_0.id else ref_0.id end
as c1
from
main.t0 as ref_0
where EXISTS (
select
ref_1.id as c0,
cast(nullif(cast(nullif(ref_1.id,
ref_0.id) as INT),
ref_0.... | true |
5c1696d70080a87a09f5a8d8953ee7839d23bc45 | SQL | shidalgo12/SQL-Challenge | /EmployeeSQL/SQL_Queries.sql | UTF-8 | 2,914 | 4.5625 | 5 | [] | no_license | --List the following details of each employee:
--employee number, last name, first name, gender, and salary.
SELECT e.emp_no, e.first_name, e.last_name, e.gender, s.salary
FROM employees e
JOIN salaries s
ON (e.emp_no = s.emp_no)
--To prevent duplicates
GROUP BY e.emp_no, e.first_name, e.last_name, e.gender, s.salar... | true |
132464582eae66c3985463aef8af935542160cb4 | SQL | joseraz/portfolio | /2020/Multichannel Case Study/q_2b.sql | UTF-8 | 1,247 | 4.46875 | 4 | [] | no_license | /* Creating RFM table*/
CREATE TABLE rfm AS(
SELECT cust_id,
NTILE(5) OVER (ORDER BY last_order_date) AS recency,
NTILE(5) OVER (ORDER BY count_order) AS frequency,
NTILE(5) OVER (ORDER BY avg_amount) AS monetary
FROM (
SELECT cust_id,
MAX(order_date) AS last_order_date,
... | true |
0ff9d05450e98332dff02e4bbcaa213b15a0f3cb | SQL | tingley/globalsight | /main6/tools/install/data/ERs/7.1.8.0/GlobalSight_7.1.8.0.6.sql | UTF-8 | 1,825 | 3.125 | 3 | [] | no_license | # For GBS-1163
# 1
INSERT INTO KNOWN_FORMAT_TYPE VALUES (
41, 'OpenOffice document','OpenOffice document(odt, ods, odp)','openoffice-xml',
'OPENOFFICE_IMPORTED_EVENT',
'XML_LOCALIZED_EVENT'
);
# 2
CREATE TABLE `openoffice_filter` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`FILTER_NAME` varchar(255)... | true |
47c09a5f59332bec70dc0c250b3014793de071a9 | SQL | N-Vitas/sdsystem | /sdsysytem.sql | UTF-8 | 1,373 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Июл 17 2015 г., 19:26
-- Версия сервера: 5.6.14
-- Версия PHP: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... | true |
ba050c55f6fa2fa42c9f32d68ad7e50aea81a1a1 | SQL | krishnamohankaruturi/secret | /aart-web-dependencies/db/ddl/76.sql | UTF-8 | 1,516 | 3.671875 | 4 | [] | no_license | -- US13041: Auto registration - Auto register Alternate population
UPDATE assessment set assessmentcode = 'SCD' where assessmentname='Students with Significant Cognitive Disabilities';
CREATE TABLE autoregistrationcriteria(
id bigserial NOT NULL,
assessmentprogramid bigint NOT NULL,
testingprogramid bigint NOT NUL... | true |
2418523ad1ce8d2223ef3e831b96e69655014d6e | SQL | JavierHerreraM/take-notes-database | /procedures/notes/insert_note.sql | UTF-8 | 259 | 2.890625 | 3 | [] | no_license | DELIMITER $$
CREATE PROCEDURE `insert_note`(username_value VARCHAR(45), title_value VARCHAR(45), body_value TEXT)
BEGIN
INSERT INTO notes VALUES (NULL, (SELECT user_id from users WHERE username = username_value), title_value, body_value);
END$$
DELIMITER ;
| true |
e45fe472d367d64fcaffe625cfa6c4f3a9a6ef1c | SQL | khooversoft/Dashboard | /Src/Dashboard.sql/App/Views/View-StageHistory.sql | UTF-8 | 423 | 3 | 3 | [
"MIT"
] | permissive | CREATE VIEW [App].[View-StageHistory]
AS
SELECT x.[StageHistoryId]
,x.[ProviderId]
,p.[Provider]
,x.[StageId]
,s.[Stage]
,x.[StartDate]
,x.[CompletedDate]
FROM [AppDbo].[StageHistory] x
INNER JOIN [AppDbo].[Provider] p on x.... | true |
266a3935b6e4bfec50cb7d33bad495311ee01b5b | SQL | Peter-Korobeynikov/Master | /app/addons/rma/database/status_descriptions/lang_en.sql | UTF-8 | 1,405 | 2.921875 | 3 | [
"MIT"
] | permissive | REPLACE INTO ?:status_descriptions (`status_id`, `description`, `email_subj`, `email_header`, `lang_code`)
SELECT
status_id,
'Requested' as description,
'has been requested successfully.' as email_subj,
'Your return has been requested successfully.' as email_header,
'en' as lang_code
FROM ?:statuses... | true |
39f77af2e1ff595e1751b70b2d9786f9d1a2b8ff | SQL | ChernetsElena/RBS-Step1-4 | /Задание 4/1.1.sql | UTF-8 | 659 | 2.921875 | 3 | [] | no_license | -- CREATE DATABASE organization;
CREATE SCHEMA partition;
CREATE TABLE partition.t_employees (
pk_id serial PRIMARY KEY,
c_lastname varchar NOT NULL,
c_firstname varchar NOT NULL,
c_middlename varchar,
c_salary money NOT NULL,
c_email varchar,
c_position varchar NOT NULL
);
CREATE TABLE ... | true |
8214ef32cb3eef602070fb00dc36c7a01d0a69b8 | SQL | rabiixx/BBDDI | /MiAulario/Prácticas/Práctica 4b/creap4b.sql | UTF-8 | 2,750 | 3.65625 | 4 | [] | no_license | CREATE TABLE ARTICULO(
CODART VARCHAR2(4) NOT NULL,
DESCRIP VARCHAR2(35) NOT NULL,
STOCK NUMBER(4, 0) NOT NULL,
CONSTRAINT PK_ARTICULO PRIMARY KEY (CODART)
);
CREATE TABLE CLIENTE(
CODCLI VARCHAR2(3) NOT NULL,
NOMBRE VARCHAR2(25) NOT NULL,
DIRECCION ... | true |
995f60326a7db44673e245f2885d63409c600685 | SQL | GCxEnding/Project_academy | /Project_academy/WebContent/sql_query/reply_notice.sql | UTF-8 | 385 | 2.53125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `java2d`.`reply_notice` (
`reply_index` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`reply_id` VARCHAR(15) NOT NULL,
`reply_board_number` INT UNSIGNED NOT NULL,
`reply_name` VARCHAR(6) NOT NULL,
`reply_content` VARCHAR(200) NULL,
`reply_date` DATETIME NOT NULL,
INDEX `id_idx` (... | true |
fbc2a20040b569daa63110590614771bf003e0ac | SQL | helloJunejun/WorkSpace_JDBC | /02.jdbc_pattern/docs/sql/member_notice_ddl_dml.sql | UTF-8 | 1,827 | 4.125 | 4 | [] | no_license | -- master : member table
-- 테이블레벨 단일컬럼 식별키 제약 지정
-- 1단계
create table member (
member_id varchar2(30),
member_pw varchar2(20) not null,
name varchar2(20),
mobile varchar2(13) not null,
email varchar2(30) not null,
entry_date varchar2(10) not null,
grade varchar2(1) not null,
mileage number(6),
manager varchar2(... | true |
21a7ce5bee67446d12eb67eae3531ab5fe46b577 | SQL | enamba/janamesa | /application/data/update/done/sprint18/update-29-03-2012-number-field.sql | UTF-8 | 237 | 2.828125 | 3 | [] | no_license | alter table city_verbose
add column number varchar(80) default null,
add column number_regex varchar(255) default null;
alter table city_verbose
modify column cityId INT not null;
alter table city_verbose add index(`cityId`); | true |
608b5f3636da95eb78d3de7f9cc458be6874a8bb | SQL | jhenk/jobsearch | /sql/createcompanies_sample_data.sql | UTF-8 | 822 | 2.90625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS jobsearch;
use jobsearch;
DROP TABLE IF EXISTS companies;
CREATE TABLE companies (
compname VARCHAR(30),
compstreet1 VARCHAR(30),
compstreet2 VARCHAR(30),
compcitystatezip VARCHAR(40),
comptype VARCHAR(1),
compwebsite CHAR(40),
compemail CHAR(40),
compphone VARCHAR(25),
co... | true |
98df1d66693f01ec21d9486df8f0a64d97794ff5 | SQL | Flamarionfp/fundamentos-mysql | /doc.sql | UTF-8 | 1,753 | 4.375 | 4 | [] | no_license |
/*Comandos básicos MYSQL:*/
/*TODOS os comandos devem terminar com PONTO E VÍRGULA (;)*/
SHOW DATABASE; /*-Mostrar tabelas*/
CREATE DATABASE nomedobanco; /*-Criar um novo db*/
USE nomedobanco; /*-Passa a usar tal banco*/
SHOW TABLES; /*-Mostrar tabelas daquele banco*/
/*Criar tabela: Passa o nome da tabela, suas... | true |
a4a8f6d4ac3514caf33cafd8564abb0ce5092fa1 | SQL | bellmit/lol-java | /DB/01/region/01_SYS_CREATE_EVENT.sql | UTF-8 | 912 | 3.296875 | 3 | [] | no_license | -- 玩家事件表
drop table if exists t_event_summoner;
create table t_event_summoner
(
context varchar(63) not null comment '召唤师ID',
status tinyint not null comment '状态',
source varchar(64) not null comment '来源',
create_time timestamp not null comment '创建时间',
update_time timestamp nul... | true |
e42376ae2063dc4a0b602ba2135dd2a3aed254fc | SQL | sebinsequira99/SQL_Files | /new/Usp_getallrelationships changes for formsystem.sql | UTF-8 | 1,419 | 3.296875 | 3 | [] | no_license |
UNION ALL
SELECT distinct r.ConnId
,t.RelationshipSubTypeId
,s.RelationshipSubTypeText COLLATE DATABASE_DEFAULT as RelationshipSubTypeText
,r.ConnectionId as ConnectionId1
,t.RelationshipTypeId as RelTypeid1
,t.RelationshipTypeText COLLATE DATABASE_DEFAULT as... | true |
26bee7cabe560e3b80b0f7a89dadc8090377f11c | SQL | shenzhixun/springboot-bss-component | /user-flow/src/main/resources/static/create(user-flow).sql | UTF-8 | 10,412 | 3.703125 | 4 | [] | no_license | -- ----------------------------
-- 流程定义表 `bss_flow`
-- ----------------------------
DROP TABLE IF EXISTS `bss_flow`;
CREATE TABLE `bss_flow` (
`id` int(11) NOT NULL AUTO_INCREMENT ,
`flow_id` int(11) NOT NULL COMMENT '流程ID',
`flow_code` varchar(32) NOT NULL CO... | true |
1ff047f8605ba613cc5531edcacc46966dab13a2 | SQL | joe-sc-liu/springboot-demo | /springdemo.sql | UTF-8 | 1,264 | 2.875 | 3 | [
"MIT"
] | permissive |
CREATE TABLE IF NOT EXISTS public.classroom(
id serial primary key,
name varchar(255),
createdate timestamp with time zone default current_timestamp,
modifydate timestamp with time zone,
creatoraccountid integer NOT NULL,
modifieraccountid integer NULL,
enable ... | true |
5f8a5aebdbb764c78414dc8bb2c4aeb14894c26d | SQL | stevleibelt/General_Howtos | /development/database/postgresql/sql_queries/string.sql | UTF-8 | 1,602 | 3.84375 | 4 | [] | no_license | --
-- @see
-- https://www.dcodeman.com/string-concatenation-using-pipe-operator-in-postgresql/ - 20220926
--
-- BO: Concating strings
-- Deal with possible null values when concating strings
-- We want to create the following string from pieces
-- 'There', 'is', 'no', NULL, 'foo', 'without', 'a', 'bar'
-- Us... | true |
4fbdbe67efe10580a40c7ce3c5a5551f4ee26140 | SQL | maghoff/pixu.rs | /migrations/2020-06-21-115645_add_pixur_series/down.sql | UTF-8 | 402 | 3.359375 | 3 | [] | no_license | DROP TABLE pixur_series;
CREATE TABLE pixur_authorizations (
pixur_id INTEGER NOT NULL,
sub TEXT NOT NULL,
PRIMARY KEY (pixur_id, sub),
FOREIGN KEY (pixur_id) REFERENCES pixurs(id)
);
INSERT INTO pixur_authorizations (pixur_id, sub)
SELECT pixur_series_id, sub FROM pixur_series_authorizations JOI... | true |
29dddda8c8a0a72c8c77d3d2e079873bc09ee119 | SQL | andreas-kupries/cm | /fixes/010_campaign_received_unique.sql | UTF-8 | 956 | 3.59375 | 4 | [] | no_license | -- - - -- --- ----- -------- ------------- ---------------------
-- Add unique constraint toi "campaign_received" (mailrun, email)
--
-- Done via a helper table as sqlite's ALTER TABLE can only append new
-- columns and rename entire tables
CREATE TABLE new_campaign_received (
-- The addresses which received mail... | true |
01c22881db5d2176197096ba879f2eee3286e490 | SQL | lt911/PL-SQL-Fundamentals-2018- | /HW1.sql | UTF-8 | 2,508 | 3.453125 | 3 | [] | no_license | /* PL/SQL lession 1 */
/*Q1*/
/* Choice d: at leaset one statement in the execution block*/
/*Q2*/
SET SERVEROUTPUT ON
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World');
END;
/*Q3*/
/* c is invalid: ' is not allowed
f is invalid: number start with character*/
/*Q4*/
/* b is not valid as CONSTANT must be initialized by a... | true |
bc25f0b40fec34b2b3327473f06c29ae59db449f | SQL | siriusckx/documents | /developer/mysql/MySQL练习脚本.sql | UTF-8 | 1,247 | 3.875 | 4 | [] | no_license | /*=========MySql常用快捷键==================
新建tab(new tab) ctrl+t
执行当前语句(execute current statement) ctrl+enter
执行全部或选中的语句(execute all or selection) ctrl+shift+enter
查看执行计划(explain current statement) ctrl+alt+x
注释 - -加空格,如 – select * from t;
*/
/*----------------------------------------------数据库基本操作-----------------... | true |
ecb1b9d1ac1b8f5e1c8830d52018eb5b25d5856f | SQL | RedHelp/RedHelpServer | /sql/20142605-bloodrequest.sql | UTF-8 | 538 | 2.984375 | 3 | [] | no_license | CREATE TABLE `redhelp_db`.`BLOOD_REQUEST` (
`B_R_ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`PATIENT_NAME` VARCHAR(50),
`DESCRIPTION` VARCHAR(400),
`UNITS` VARCHAR(20),
`PHONE_NUMBER` VARCHAR(15),
`LOCATION_LAT` DOUBLE,
`LOCATION_LONG` DOUBLE,
`ACTIVE` BOOLEAN NOT NULL,
PRIMARY KEY (`B_R_ID`)
)
CHARACTER... | true |
acd102df1f7431773501bdae369eecfd1078250a | SQL | anthonydominguez86/employee-management-mysql | /db/seeds.sql | UTF-8 | 1,614 | 3.328125 | 3 | [
"MIT"
] | permissive | USE employee_trackerDB;
-- Department
INSERT INTO department (name)
VALUE ("Sales");
INSERT INTO department (name)
VALUE ("Engineering");
INSERT INTO department (name)
VALUE ("Finance");
INSERT INTO department (name)
VALUE ("Legal");
-- Role
INSERT INTO role (title, salary, department_id)
VALUE ("Lead Engineer", 1500... | true |
71e19caddbd19e2544e1a90d0f0d472325f047b8 | SQL | kethansrinivas9/Group-Formation-Application | /SQL/spAssignGuestRoleToUser.sql | UTF-8 | 240 | 2.625 | 3 | [] | no_license | DELIMITER $$
CREATE DEFINER=`CSCI5308_8_DEVINT_USER`@`%` PROCEDURE `spAssignGuestRoleToUser`(
IN bannerID VARCHAR(45),
IN roleID int(11)
)
BEGIN
INSERT INTO SystemRole(BannerID, RoleID)
VALUES (bannerID, roleID);
END$$
DELIMITER ; | true |
56bae02df1b7a553a23a7e120eaa0bea3ba9474e | SQL | JackieZzh/summary | /仿脉达转发红包项目/sql/wx_prykforwarding_activelist.sql | UTF-8 | 1,669 | 3.15625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : pryktest
Source Server Version : 50720
Source Host : 106.15.94.97:3306
Source Database : weixinprykweb
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2019-11-11 10:48:20
*/
SET FOREIGN_KEY_CHECKS=... | true |
08a6a17a6efacbb2d4321e03bf2fff61b0871c14 | SQL | Eeki/chat-app | /server/migrations/sqls/20210722191756-grant-role-up.sql | UTF-8 | 417 | 2.515625 | 3 | [
"MIT"
] | permissive | ALTER DEFAULT privileges REVOKE EXECUTE ON functions FROM public;
GRANT usage ON SCHEMA chat TO chat_anonymous, chat_person;
GRANT EXECUTE ON FUNCTION chat.register_person (text, text, text) TO chat_anonymous;
GRANT EXECUTE ON FUNCTION chat.authenticate (text, text) TO chat_anonymous, chat_person;
GRANT ALL privileg... | true |
abc7910a9e2ec87fbbee053dec7c71e4d408e9d1 | SQL | vini/myspider | /webx.sql | UTF-8 | 1,185 | 3.015625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : Mysql - Localhost
Source Server Version : 50616
Source Host : localhost:3306
Source Database : webx
Target Server Type : MYSQL
Target Server Version : 50616
File Encoding : 65001
Date: 2016-03-16 21:18:43
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
082e38b810f50fdb95ae29bc186341f44d8ab656 | SQL | RobinDeBock/db | /reeks-8.sql | UTF-8 | 2,648 | 4.1875 | 4 | [] | no_license | /**
1.a
*/
WITH x as (
SELECT nation,weight,count(*) aantal
FROM Competitors c
WHERE weight is not null
group by nation,weight
)
SELECT *
FROM x
WHERE x.aantal >= ALL (SELECT aantal FROM x xx WHERE xx.nation = x.nation)
ORDER BY aantal DESC;
/**
1.b
*/
WITH x as (
SELECT nation,wei... | true |
89a2397a27c3807d7b2309cf84c55dc918ffa1f4 | SQL | boulahiainsaf/test | /jarditou/user/tabluser.sql | UTF-8 | 337 | 2.609375 | 3 | [] | no_license | CREAT table users (
us_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
us_nom VARCHAR(50) NOT NULL,
us_prenom VARCHAR(50) NOT NULL,
us_mail VARCHAR (50) NOT NULL,
us_login VARCHAR(50) NOT NULL,
us_password VARCHAR(50) NOT NULL,
us_date_inscription DATE NOT NULL,
us_date_der_connexion... | true |
0789134fb96fafb1fd43aee30217731b83a1ff47 | SQL | carthage-college/django-djpersonnel | /djpersonnel/core/level3.sql | UTF-8 | 562 | 3.90625 | 4 | [
"MIT"
] | permissive | SELECT
trim(id_rec.lastname) as lastname, trim(id_rec.firstname) as firstname,
id_rec.id, trim(job_rec.descr) as description, trim(job_rec.job_title) as job_title,
trim(email_rec.line1) as email,
job_rec.tpos_no
FROM
id_rec
LEFT JOIN
job_rec
ON
id_rec.id = job_rec.id
LEFT JOIN
aa_rec as ... | true |
5ef830eb05085f226639ab2053bf385d11a9c318 | SQL | Nachtmahr91/db-public | /src/customizations/InstaCastBuffs.sql | UTF-8 | 426 | 2.75 | 3 | [] | no_license | # Changes most buff spells to insta-cast
# Note that this will make it much easier in PVP
# to rebuff after having buffs sheared.
UPDATE `Spell` SET `CastTime`=0 WHERE `Type` LIKE '%buff%' AND `Concentration`>0;
UPDATE `Spell` SET `CastTime`=0 WHERE `Type` LIKE '%buff%' AND `Type`!='HealthRegenBuff' AND `Duration... | true |
224d0a7a8e1ef965ba502a8ef434b3dff22fdc87 | SQL | nemethdav/fwsProbafeladat | /fwsprobafeladat.sql | UTF-8 | 9,234 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Gép: 127.0.0.1
-- Létrehozás ideje: 2021. Júl 29. 18:36
-- Kiszolgáló verziója: 10.4.17-MariaDB
-- PHP verzió: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
8a1a9453e9529b572ca6fefcba30d1167e616764 | SQL | patilanup246/Merkle | /VTWC/CRM/Reference/Views/vwMasterPostCodeLookup.sql | UTF-8 | 719 | 3.578125 | 4 | [] | no_license |
CREATE VIEW [Reference].[vwMasterPostCodeLookup]
AS
SELECT
NS.PostCodeDistrict
,NS.KMtoNeaarestStation
,L.Name NearestStation
--,LG.Name Region
FROM
Reference.LocationPostCodeLookup NS
JOIN [Reference].[Location] L with(nolock) ON L.LocationID = NS.LocationID
--JOIN Reference.LocationMappin... | true |
a4ad285d55c6e61e3c641e560293f7242566d9b2 | SQL | dharmu05/Hands-On-Data-Science-with-SQL-Server-2017 | /CH12_Real_World_Example/05_testing_nullability.sql | UTF-8 | 199 | 2.546875 | 3 | [
"MIT"
] | permissive | select count(*)
from SourceData.Contracts
where PhoneId is null
select count(*)
from SourceData.Actions
where RecordId is null
select count(*)
from SourceData.Actions
where Units is null | true |
e89e3d353629848559a5eb48ab5fa0e9232ace8f | SQL | clearingyx/bill | /bill.sql | UTF-8 | 7,934 | 3.25 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50610
Source Host : localhost:3306
Source Database : bill
Target Server Type : MYSQL
Target Server Version : 50610
File Encoding : 65001
Date: 2016-10-12 18:07:59
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
65abd16047475dd231b17daef3213e9d7058db4f | SQL | gluix20/agroamerica | /GSHEETS/Create Ext PALM_CONTRATOS_DET.sql | UTF-8 | 735 | 3.296875 | 3 | [] | no_license | select * from AGROSTG.PALM_CONTRATOS_DET;
/*DROP*/
drop table AGROSTG.PALM_CONTRATOS_DET;
/*CREATE*/
CREATE TABLE AGROSTG.PALM_CONTRATOS_DET(
CONTRATO_COD VARCHAR2(100 BYTE),
MES VARCHAR2(100 BYTE),
FECHA_INI DATE,
FECHA_FIN DATE,
TM NUMBER
)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY g... | true |
eae04316a22e01ec65ed78f9b0c912db75dc981c | SQL | tpeponas/nmon2pg | /init_nmon_db_pg.sql | UTF-8 | 14,176 | 2.96875 | 3 | [] | no_license |
drop table CPU_ALL CASCADE;
drop table PCPU CASCADE;
drop table SCPU CASCADE;
drop table MEM CASCADE;
drop table MEMNEW CASCADE;
drop table MEMUSE CASCADE;
drop table LPAR CASCADE;
drop table DISKAVGRIO CASCADE;
drop table DISKAVGWIO CASCADE;
drop table DISKBSIZE CASCADE;
drop table DISKBUSY CASCADE;
drop... | true |
de4a325ebb96f2cdbed9d1dbdb5ac71b428916cd | SQL | Georgi051/MySQL | /Data Definition and Datatypes/15 task.sql | UTF-8 | 642 | 2.65625 | 3 | [] | no_license |
INSERT INTO `towns`(name)VALUES('Sofia'),('Plovdiv'),('Varna'),('Burgas');
INSERT INTO `departments`(name)VALUES('Engineering'),('Sales'),('Marketing'),('Software Development'),('Quality Assurance');
INSERT INTO `employees`(`first_name`, `middle_name`, `last_name`,job_title,department_id,hire_date,salary)VALUES
('Iva... | true |
018fbb66083c32759c0692c7f5b9dd98dadffa1a | SQL | MuratxSinan/habitat | /sql/different_species.sql | UTF-8 | 750 | 3.359375 | 3 | [] | no_license | --How many different species of mushroom are there, if a species is identified by the attributes 1-20?
-- You can also run sqls in the sql folder by navigating the url below. Please select `postgres_default` in the selectbox and copy contents of the sql script and paste in the text area in the page. You can run or dow... | true |
b14c8d62d4a1832d8d5fdc51ee35c930e74ac05a | SQL | soslin/database-exercises | /3.11_more_exercises.sql | UTF-8 | 17,535 | 5.0625 | 5 | [] | no_license | -- 1. How much do the current managers of each department get paid, relative to the average salary for the department?
-- Is there any department where the department manager gets paid less than the average salary?
USE employees;
SELECT e.first_name, e.last_name, d.dept_name, s.salary
FROM salaries AS s
JOIN dept_ma... | true |
fb9636b5b8ed367024e18aae5af8d8355d06aae4 | SQL | stevedavidmusic/MTGDECKBUILDER | /db/get_user_decks.sql | UTF-8 | 238 | 3.21875 | 3 | [] | no_license | -- SELECT u.user_id, username
-- FROM users_mtg u
-- JOIN decks d
-- ON u.user_id = d.user_id;
SELECT d.user_id, deck_name, deck, deck_id
FROM decks d
JOIN users_mtg u
ON d.user_id = u.user_id
WHERE d.user_id=$1
ORDER BY deck_id DESC; | true |
227bd6d94ef7a5d28e38246b05bc826170b665cc | SQL | wf-oadenaike/TestProject | /TestDBProject/CADIS/Views/Views2/VW_SQL_Roles_and_Permissions_Users.sql | UTF-8 | 160 | 2.65625 | 3 | [] | no_license | CREATE VIEW "CADIS"."VW_SQL_Roles_and_Permissions_Users"
AS
SELECT NAME
FROM sys.database_principals
WHERE NAME NOT LIKE 'CADIS%'
AND NAME NOT LIKE 'db_%'
| true |
c111170fa735309bab2fd889728bdf89e04e563c | SQL | nuaSiekier/SQLExercises | /SQLQuery13.sql | UTF-8 | 383 | 2.96875 | 3 | [] | no_license | --1
SELECT categoryname
FROM Production.Categories
where categoryname like 'c%' or categoryname like '%s'
--2
SELECT *, REPLACE(description, 'ess', 'xyz') as podmienione
FROM Production.Categories
--3
SELEct UPPER('city: '+city+' country: '+country) as adress
FROM HR.Employees
--mozna uzyc concat
--4
SELECT *, LEFT... | true |
950b8aee3f1392cdef1eee4b8323ac9e4c5603a4 | SQL | hqottsz/MXI | /assetmanagement-database/src/base/plsql/maintenix/data/refterm/0ref_resched_from.sql | UTF-8 | 1,272 | 2.515625 | 3 | [] | no_license | --liquibase formatted sql
--changeSet 0ref_resched_from:1 stripComments:false
/********************************************
** INSERT SCRIPT FOR TABLE "REF_RESCHED_FROM"
** 0-Level
** DATE: 12-MARCH-2009
*********************************************/
insert into ref_resched_from(resched_from_db_id, resched_from_cd, d... | true |
715d2c6b0cf42fb46ec71eba7e8245dd064db3cb | SQL | adamwight/wmf-open-editing | /load_reference_tables.sql | UTF-8 | 878 | 3.09375 | 3 | [] | no_license | drop table if exists woe_wikidb;
create table woe_wikidb (
dbname varchar(255),
private int
);
load data local infile 'public_dbs.txt'
into table woe_wikidb
lines terminated by '\n'
(dbname)
set private = 0;
load data local infile 'private_dbs.txt'
into table woe_wikidb
lines terminated by '\n'
(dbname)
set private... | true |
e90217fcbc95b27e2c971e51d5572f0249d28bca | SQL | thivalls/orange-talents-02-template-ecommerce | /src/main/resources/data.sql | UTF-8 | 2,706 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO users(email, password, created_at) VALUES ('email@email.com', '$2a$10$eACCYoNOHEqXve8aIWT8Nu3PkMXWBaOxJ9aORUYzfMQCbVBIhZ8tG', '2019-01-21T05:47:20.949');
INSERT INTO users(email, password, created_at) VALUES ('email1@email.com', '$2a$10$eACCYoNOHEqXve8aIWT8Nu3PkMXWBaOxJ9aORUYzfMQCbVBIhZ8tG', '2019-01-21T05:... | true |
67e995bdd019873b9350bf81fc86715957fa44dd | SQL | omsfuk/Samurai | /src/main/resource/schema.sql | UTF-8 | 227 | 2.53125 | 3 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS smart;
CREATE DATABASE smart DEFAULT CHARACTER SET UTF8;
use smart;
CREATE TABLE user (
id int AUTO_INCREMENT PRIMARY KEY,
username varchar(20) NOT NULL UNIQUE,
password VARBINARY(20) NOT NULL
)
| true |
345f61bb5f5392cfe035fff9ad92502951f1ec21 | SQL | MrYakobo/fb-extract | /examples/500_random.sql | UTF-8 | 1,122 | 4.625 | 5 | [
"MIT"
] | permissive | -- Select some messages along with reaction info (aka like a "normal" read from messenger)
-- Also, list the participants in this chat.
-- Create a "global variable", which holds a randomized chat-id.
CREATE TEMPORARY TABLE t (cid INTEGER);
INSERT INTO t (SELECT FLOOR(RANDOM()*(SELECT COUNT(*) from chats)));
-- Selec... | true |
f41f2d2f5e94fa567b4343c2c57a74163dc740ea | SQL | simasce/WebService-GameRatings | /db_container/db_default.sql | UTF-8 | 3,785 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
CREATE DATABASE rating_database CHARACTER SET utf8 COLLATE utf8_general_ci;
USE rating_database;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+02:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... | true |
7a7eac038c0b498d0dac9c4b82222bee49119a49 | SQL | vokoramus/MySQL_homework | /(test) singer_rating.sql | UTF-8 | 2,969 | 4.4375 | 4 | [] | no_license |
DROP FUNCTION IF EXISTS singer_rating;
DELIMITER //
CREATE FUNCTION singer_rating(for_singer BIGINT UNSIGNED)
RETURNS FLOAT READS SQL DATA
BEGIN
DECLARE views_number_rating INT;
DECLARE songs_rating INT;
DECLARE singers_fav_rating INT;
-- посчитаем views_number_rating через SET
SET views_number_rating = (SELEC... | true |
4b4306c665caef704c262d9ae7ac7a4de767a408 | SQL | AkankshaKaple/SQL-Practice-SQL-Cookbook | /01_Retriving_Records/create_db_and_table.sql | UTF-8 | 461 | 2.796875 | 3 | [] | no_license |
CREATE DATABASE emp_info;
USE emp_info;
CREATE TABLE emp(
empno decimal(4, 0) NOT NULL,
ename varchar(40) default NULL,
job varchar(90) default NULL,
mgr decimal(4, 0) default NULL,
hiredate date default NULL,
sal decimal(7,2) default NULL,
comm decimal(7,2) default NULL,
deptno decimal(2,0) d... | true |
23821f64196c387660ba553f1a1d441807a01708 | SQL | 1jobam/dbSql_work | /2019_11_19.sql | UHC | 1,044 | 3.359375 | 3 | [] | no_license | --DML : SELECT
/*
select *
from ̺;
*/
--ڵ ظ ۼ : ּ
-- prod ̺ ÷ ȸ
select * from prod;
--prod ̺ prod_id, prod_name ÷ Ϳ ȸ
select prod_id, prod_name from prod;
-- Ǿ ִ ̺ ȸ
select * from USER_TABLES;
--̺ ÷ Ʈ ȸ
select * from USER_TAB_COLUMNS;
--DESC ̺
DESC PROD;
-- lprod ̺ ȸϴ ۼϼ
select * from l... | true |
7304624a8d2c884596ab350f2e50e38431aa8d0f | SQL | gaarason/database-all | /database-tests/database-core-test/src/test/java/gaarason/database/test/init/mysql-super_relation.sql | UTF-8 | 1,777 | 3.109375 | 3 | [
"MIT"
] | permissive | # noinspection SqlNoDataSourceInspectionForFile
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS super_relation;
CREATE TABLE super_relation
(
`id` bigint(1) unsigned NOT NULL AUTO_INCREMENT,
`relation_one_type` varchar(200) NOT NULL DEFAULT '' COMMENT '',
`relation_one_value` bigint(1) unsigned NO... | true |
037437dbbe2222e378fb7cab9d4471be3f882bf7 | SQL | kguyton6/PrivyChic | /db/loginbusiness.sql | UTF-8 | 233 | 2.828125 | 3 | [] | no_license | select * from profile
join business
on profile.user_id = business.user_id
join business_hours
on business_hours.business_id = business.business_id
join priv_users
on business.user_id = priv_users.user_id
where business.user_id = $1 | true |
1cbb356b597d174ef81b9c9a0d60fdd4059d445f | SQL | Vitors-Miranda/escola | /SistemCliente/bd.sql | UTF-8 | 410 | 3.046875 | 3 | [] | no_license | CREATE DATABASE sistema;
USE sistema;
CREATE TABLE cliente(
idcliente INT PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(50),
email VARCHAR(200),
CPF CHAR(11),
salario DECIMAL(10,2)
) engine= innoDB;
-- varchar pode variar a quantidade de caracteres (qtde variável)
-- char não é vari... | true |
9db28c796b45488dd87bbd909cd3c34f4bcdace6 | SQL | jagolu/Universidad | /2/2_Cuatrimestre/FBD/Practicas/sesion2..sql | UTF-8 | 1,747 | 3.40625 | 3 | [] | no_license | insert into proveedor values('S1','JOSE FDEZ',2,'MADRID');
select * from proveedor;
insert into proveedor values( 'S2','MANUEL VIDAL',1,'LONDRES' );
insert into proveedor values( 'S3','LUISA GOMEZ',3,'LISBOA' );
insert into proveedor values( 'S4','PEDRO SANCHEZ',4,'PARIS' );
insert into proveedor values( 'S5','MARIA RE... | true |
bd6d7e635051db4133bbb0972f2031f15f0fed90 | SQL | hasibarrafiul/SQL-Practice | /lab3.sql | UTF-8 | 593 | 3.1875 | 3 | [] | no_license | -- LAB 3
-- 09 March 2021
-- Practice queries
select TITLE
from course c, DEPARTMENT d
where d.DEPT_NAME=c.DEPT_NAME and d.BUILDING= 'Main';
select d.DEPT_NAME, BUDGET
from course c, DEPARTMENT d
where d.DEPT_NAME=c.DEPT_NAME and CREDITS >= 4;
select d.DEPT_NAME, BUDGET
from course NATURAL JOIN DEPARTME... | true |
f829f999bcbe38da57a865261cb05cd63508cda3 | SQL | Dlyf/php-boutique | /boutique/boutique.sql | UTF-8 | 6,658 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 06 juil. 2018 à 15:13
-- Version du serveur : 10.1.33-MariaDB
-- Version de PHP : 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... | true |
1074bded302b7bfcf9d6e163173a81c0f8c8a2bd | SQL | k-bialucha/rezerwacja-stolow | /SQL/Tables/innodb_RESERVATIONS.sql | UTF-8 | 6,422 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: bilardapp.c6daxmywxacx.us-east-1.rds.amazonaws.com Database: innodb
-- ------------------------------------------------------
-- Server version 5.6.37-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... | true |
e5ad7da1f8004c5b3814e70ce3e8f8dda3a01e17 | SQL | dankpapaya/RobotFactory | /public/assets/db/robot.sql | UTF-8 | 7,295 | 2.890625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 02, 2017 at 10:04 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
fb1d8783d92ff674ba1f2f3e64e5a76dabdaab5c | SQL | tranchem/fashi | /db/db_cosmetic.sql | UTF-8 | 15,427 | 2.921875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th4 14, 2021 lúc 07:40 AM
-- Phiên bản máy phục vụ: 10.4.6-MariaDB
-- Phiên bản PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
95be50e0e049b1a5aa8d811a5ac4b92bbcd86973 | SQL | marissaromero/ourHouse | /database/schema.sql | UTF-8 | 683 | 3.625 | 4 | [] | no_license | DROP DATABASE IF EXISTS ourHouse;
CREATE DATABASE ourHouse;
USE ourHouse;
CREATE TABLE homes (
id int NOT NULL AUTO_INCREMENT,
homeName varchar(50) NOT NULL,
PRIMARY KEY (ID)
);
CREATE TABLE users (
id int NOT NULL AUTO_INCREMENT,
firstName varchar(50) NOT NULL,
lastName varchar(50) NOT NULL,
username... | true |
ecd6b12063838051fabf8d0029c8227ebf83be0a | SQL | MateusRigon/Vagas-De-Emprego | /Dump MySQL/sitevagas.sql | UTF-8 | 3,810 | 2.640625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 20-Maio-2020 às 00:36
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... | true |
7f798f91a8cd2094b574c38cc4875a1739f7207f | SQL | ntsmitty/Myphers-Vintage | /db/schema.sql | UTF-8 | 885 | 3.109375 | 3 | [] | no_license | CREATE TABLE "Customer" (
"customerid" integer NOT NULL,
"firstname" VARCHAR(255) NOT NULL,
"lastname" VARCHAR(255) NOT NULL,
"email" VARCHAR(255) NOT NULL,
"lastname" VARCHAR(255) NOT NULL
) WITH (
OIDS=FALSE
);
CREATE TABLE "Product" (
"productid " integer NOT NULL,
"productName" VARCHAR(255) NOT NULL,
"pr... | true |
2128276e90a7f640692083473866ffe5ff5864ed | SQL | yani-valeva/Databases-Basics-MySQL | /Functions Triggers And Transactions/10.People with Balance Higher Than.sql | UTF-8 | 1,009 | 3.8125 | 4 | [
"MIT"
] | permissive | -- first option
DELIMITER $$
CREATE PROCEDURE `usp_get_holders_with_balance_higher_than`(IN `givenSum` DECIMAL(19, 4))
BEGIN
SELECT tb.`first_name`, tb.`last_name`
FROM
(SELECT ah.`first_name`, ah.`last_name`, SUM(a.`balance`) AS 'total_balance'
FROM `accounts` AS a
INNER JOIN `account_holders` AS ah
ON a.`accoun... | true |
2f44ab676d79235454502b3a1ec5af0455b50c80 | SQL | mjh1583/Hustar03_eGov | /workspace/workspace-query/exam_db.sql | UTF-8 | 5,594 | 3.890625 | 4 | [] | no_license | #부서 테이블
DROP TABLE t_depart;
CREATE TABLE t_depart (
de_id INT AUTO_INCREMENT,
de_name VARCHAR(20) COMMENT '부서명',
PRIMARY KEY(de_id)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;;
#직급 테이블
DROP TABLE t_class;
CREATE TABLE t_class (
cl_id INT AUTO_INCREMENT,
cl_name VARCHAR(20) COMMENT '직급명... | true |
0eda732a82545cd410d4c6d57b960b50ca25d62f | SQL | poc-test-user/poc | /directory-strategy/standard/mydb1/20210101-100000_create-user-table.sql | UTF-8 | 247 | 2.78125 | 3 | [] | no_license | -- [+] forward |
CREATE TABLE IF NOT EXISTS `mydb1`.`user` (
`id` INT(11) AUTO_INCREMENT NOT NULL,
`name` VARCHAR(1024) NOT NULL,
`password` BINARY(32) NOT NULL,
PRIMARY KEY (id)
);
-- [-] rollback |
DROP TABLE `mydb1`.`user` ;
| true |
228eeeefedb65508ff83d769a567648afae23006 | SQL | zakyalvan/spring-security-sample | /src/main/resources/META-INF/data/init-script-dml.sql | UTF-8 | 927 | 3.578125 | 4 | [] | no_license | create table users (
id bigint identity not null,
username varchar(100) not null,
password varchar(32) not null,
is_account_expired boolean default false,
is_account_locked boolean default false,
is_credentials_expired boolean default false,
is_enabled boolean default false
);
insert into users (id, userna... | true |
2887ea2a0cf273eb789a08c71e1e757b554cdc59 | SQL | Devopriya-Tirtho/Newspaper-Editorial-System | /DDS_Server/User/UserFeature/user_rating_record.sql | UTF-8 | 1,275 | 3.5 | 4 | [] | no_license | set serveroutput on;
create or replace procedure ratenews(id IN News.nid@site_link%type,useridserver IN integer)
AS
rating_number integer:=&Rating;
scid integer;
begin
insert into User_Rating_Record@site_link values(id,useridserver,rating_number);
update News@site_link
set rating =(select avg(User_Rating... | true |
55bf73a0c75fd186b014480a58e0aa70f01f46f8 | SQL | korea600/kosta130-1 | /Project2/src/iBatis/sql/GRADE_INFO.sql | UHC | 2,059 | 3.34375 | 3 | [] | no_license | --------------------------------------------------------
-- - -11-16-2016
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table GRADE_INFO
--------------------------------------------------------
CREATE TABLE "GRADE_INFO"
( "C... | true |
02018adb803b5da107de9405426d6b212dd6555b | SQL | clumsy/Civ5-MP_MODSPACK | /Mods/Nation - United States of America/TSL.sql | UTF-8 | 5,338 | 2.703125 | 3 | [] | no_license | --==========================================================================================================================
-- Civilizations_YagemStartPosition (Earth Giant)
--==========================================================================================================================
INSERT INTO Civil... | true |
a2dc2a840c4e41e6a9dc286f490baef56ff4449e | SQL | tate-steinour/BigBallerData | /queries/team_wins_over_seasons.sql | UTF-8 | 407 | 3.328125 | 3 | [] | no_license | --Analyzes the relation between the number of points a team averages in a
--season and their win total
DROP VIEW IF EXISTS team_wins_over_seasons;
CREATE VIEW team_wins_over_seasons AS
SELECT t_name, ts_season, ts_wins, ts_pts, ts_3ptm, ts_ftm, ts_reb, ts_ast, ts_tov, ts_stl
FROM team_stats
JOIN team O... | true |
cadf24722400f530e3457acd45df4896badf5cd0 | SQL | nekoTheShadow/sqlpuzzle | /11.sql | UTF-8 | 1,147 | 4.25 | 4 | [] | no_license | DROP TABLE IF EXISTS Projects;
CREATE TABLE Projects
(workorder_id CHAR(5) NOT NULL,
step_nbr INTEGER NOT NULL
CHECK (step_nbr BETWEEN 0 AND 1000),
step_status CHAR(1) NOT NULL
CHECK (step_status IN ('C', 'W')), -- Cは完了、Wは待機
PRIMARY KEY (workorder_id, step_nbr));
INSERT INTO Projects VALUES('A... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.