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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
569d48c88691550f960a891963fdf458a7643c58 | SQL | DV8FromTheWorld/Pizza-Order-Website | /sql/Constraints.sql | UTF-8 | 769 | 3.234375 | 3 | [] | no_license | ALTER TABLE Orders ADD
(
CONSTRAINT order_studentId_fk FOREIGN KEY (studentId) REFERENCES Student (bannerId),
CONSTRAINT order_hallId_fk FOREIGN KEY (hallId) REFERENCES ResidenceHall (hallId),
CONSTRAINT order_workerId_fk FOREIGN KEY (workerId) REFERENCES Worker (workerId)
);
ALTER TABLE Pizza_Toppings AD... | true |
d0d01d560a1ecfee6f42b83ca1dccfa6c509a3e4 | SQL | jcarmonaedu/AdministradorCursos1 | /script_bd.sql | UTF-8 | 1,218 | 2.875 | 3 | [] | no_license | CREATE TABLE curso (
id_curso int,
descripcion varchar(255),
precio int,
PRIMARY KEY (id_curso)
);
CREATE TABLE forma_pago (
id_forma_pago int,
descripcion varchar(255),
recargo int,
PRIMARY KEY (id_forma_pago)
);
CREATE TABLE inscripcion (
id_inscripcion int,
nombre varc... | true |
e0a01f9463d0e6b8e6d40efb11ce23e811d5646e | SQL | krivachy/PortalWebshop | /ddl/letrehozas.sql | UTF-8 | 617 | 3.03125 | 3 | [
"MIT"
] | permissive | USE portaltech;
DROP TABLE IF EXISTS FELHASZNALO;
CREATE TABLE FELHASZNALO(
f_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
f_nev VARCHAR(200) NOT NULL UNIQUE,
jelszo VARCHAR(200) NOT NULL,
nev VARCHAR(200) NOT NULL,
admin BOOLEAN NOT NULL
);
DROP TABLE IF EXISTS TERMEK;
CREATE TABLE TERMEK(
t_id INT NOT ... | true |
99dbd0117431939fc49220f32bc1f0cae552638b | SQL | libla/Phoenix3D | /Bin/DataServer/mysql/accounts.sql | UTF-8 | 1,832 | 2.890625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : aliyun
Source Server Version : 50613
Source Host : 115.28.35.69:3306
Source Database : accounts
Target Server Type : MYSQL
Target Server Version : 50613
File Encoding : 65001
Date: 2014-05-16 15:57:06
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... | true |
f88f9f1112a15106756f4abf17bed0d2921b37e1 | SQL | mukeshrajbhar9456/scientiment | /scientiment.sql | UTF-8 | 5,212 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 25, 2020 at 05:54 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
a49e436d044f5f846f0145b0964eb471f3bd1608 | SQL | MCZbase/DDL | /TABLE/CTTAXA_FORMULA.sql | UTF-8 | 211 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive |
CREATE TABLE "CTTAXA_FORMULA"
( "TAXA_FORMULA" VARCHAR2(25 CHAR) NOT NULL ENABLE,
"DESCRIPTION" VARCHAR2(4000),
CONSTRAINT "CTTAXA_FORMULA_PK" PRIMARY KEY ("TAXA_FORMULA")
USING INDEX ENABLE
) | true |
a6bcb072d1174988e6d1798e56857d741bdaab2f | SQL | alu0100951844/Base_de_datos_Vivero | /script_para_Postgre.sql | UTF-8 | 7,839 | 3.90625 | 4 | [] | no_license | CREATE SCHEMA IF NOT EXISTS mydb;
-- Tabla vivero
CREATE TABLE IF NOT EXISTS mydb.VIVERO (
coordenadas_vivero FLOAT NOT NULL,
localidad VARCHAR(45) NOT NULL,
PRIMARY KEY (coordenadas_vivero));
-- Tabla zona
CREATE TABLE IF NOT EXISTS mydb.ZONA (
nombre_zona VARCHAR(64) NOT NULL,
coordenada_vivero FLOAT NOT... | true |
485c2477cf0ab63000d24d6622b7c85aac19613b | SQL | souhakhelifi/cv_data | /stage (1).sql | UTF-8 | 5,501 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mar 25 Août 2020 à 11:04
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
41968d73207aae62341632a69765ac7016cc6bfa | SQL | Wang-Yann/LeetCodeMe | /MySQL/1303_find-the-team-size.sql | UTF-8 | 1,959 | 3.921875 | 4 | [] | no_license | -- @Author : Rock Wayne
-- @Created : 2020-08-05 23:00:49
-- @Last Modified : 2020-08-05 23:00:49
--
-- #员工表:Employee
-- #
-- #
-- #+---------------+---------+
-- #| Column Name | Type |
-- #+---------------+---------+
-- #| employee_id | int |
-- #| team_id | int |
-- #+--------------... | true |
ea57412d242145a3b96b0970997a9dcbdfa24842 | SQL | koodilauri/monster-hunter-app-backend | /db/migrations/V1_1__create-quest.sql | UTF-8 | 725 | 3.15625 | 3 | [] | no_license | CREATE TABLE quest (
id SERIAL PRIMARY KEY,
name VARCHAR (40) NOT NULL,
stars smallint,
quest_giver VARCHAR (30) NOT NULL,
goal VARCHAR (100) NOT NULL,
sub_goal VARCHAR(100) NOT NULL,
game VARCHAR (30) NOT NULL
);
CREATE TABLE monster_in_quest (
id SERIAL PRIMARY KEY,
monster VARCHAR(30) NOT NULL,
... | true |
162824353dceed31c6b6e8d947b62a10c8b7d43d | SQL | alamer/cheat-sheet | /oracle/sql/performance/segStat.sql | UTF-8 | 407 | 3.125 | 3 | [] | no_license | select OWNER, OBJECT_NAME, SUBOBJECT_NAME, STATISTIC_NAME, VALUE, round( VALUE * 8192 / 1024 / 1024 / 1024, 1 ) GB
from v$segstat
left join DBA_OBJECTS on OBJ# = OBJECT_ID
where OWNER not in ( 'SYS', 'SYSTEM', 'DBSNMP', 'WMSYS', 'XDB', 'EXFSYS', 'MDSYS', 'OLAPSYS', 'SYSMAN' )
and STATISTIC_NAME='logical reads' /* or ST... | true |
005607493b9903dc0638ffed38d4aa519a221c7b | SQL | RebellionRider/pl-sql-tut-86 | /multiple-bind-variables-with-execute-immediate-by-manish-sharma-from-rebellionrider.sql | UTF-8 | 1,126 | 3.578125 | 4 | [] | no_license | --Create a demo table for the demonstration
CREATE TABLE stu_info(
student_name VARCHAR2(20)
);
--Insert data into the table
--TRUNCATE TABLE stu_info;
INSERT INTO stu_info (student_name) VALUES ('Tony');
INSERT INTO stu_info (student_name) VALUES ('Banner');
INSERT INTO stu_info (student_name) VALUES ('Leo'); -... | true |
a5cae392b6bd18cea694273eac83f4eceb9a6dc9 | SQL | ingan274/CLICK | /db/schema.sql | UTF-8 | 792 | 2.75 | 3 | [] | no_license | DROP DATABASE IF EXISTS click_db;
CREATE database click_db;
USE click_db;
CREATE TABLE `Matches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_name` varchar(100) NOT NULL,
`last_name` varchar(100) NOT NULL,
`gender` varchar(50) NOT NULL,
`age` int(11) NOT NULL,
`city` varchar(100) NOT NULL,
`state` varc... | true |
2e175ce7810cb5fbc8880bfde59fe00658e6795a | SQL | NoahThomlison/BootcampX | /2_queries_joins/6_low_average_completion_time.sql | UTF-8 | 498 | 3.984375 | 4 | [] | no_license | SELECT students.name, AVG(assignment_submissions.duration), AVG(assignments.duration)
FROM students
JOIN assignment_submissions ON assignment_submissions.student_id = students.id
JOIN assignments ON assignments.id = assignment_submissions.assignment_id
WHERE students.end_date IS NULL
GROUP BY students.name
HAVI... | true |
3ad498197d9be41f39b4d1c46562f29ab211f39f | SQL | viniciusares/SQL-query-examples | /SQL_commands.sql | UTF-8 | 1,282 | 4.25 | 4 | [] | no_license | ## SQL SELECT FROM
SELECT id, name
FROM accounts;
/*After SELECT you list the columns desired,
after FROM goes the table you want the data from
Syntax:
SELECT column1, column2, etc
FROM table_name
*/
## LIMIT
SELECT *
FROM accounts
LIMIT 10;
/* LIMIT: maximum number of rows displayed.
Prevents taking too long. You... | true |
6072d37790a5c1d0ed7a7dfdc41986dccdca7e2b | SQL | joseLobito/CRUD_MVC | /prueba_semillero.sql | UTF-8 | 1,824 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 20-03-2020 a las 00:42:18
-- Versión del servidor: 5.7.24
-- Versión de PHP: 7.2.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
1faf0c4c483601bac17c1fb4dad2c38fb8df7e6a | SQL | NCIP/caarray-docs | /auditing/date_range.sql | UTF-8 | 273 | 3.265625 | 3 | [] | no_license | SELECT r.id, r.created_date, r.username, r.type, r.entity_name, r.entity_id, d.attribute, d.old_value, d.new_value, d.message
FROM audit_log_detail d, audit_log_record r
WHERE d.record = r.id
AND r.created_date BETWEEN "2013-08-01" AND "2013-09-01"
ORDER BY r.created_date; | true |
06239d43bbe2a67405d773292c90644e15f7cfa6 | SQL | sharmasuraj0123/Ryoku | /.idea/dataSources/c2f8cdc8-df8b-4a8a-8227-6b5f3bdd08fb/_staging_/schema/CSE305_RYOKU/routine/editEmployee.(int(11),int(11),varchar(20),varchar(20),varchar(50),varchar(50),varchar(50),varchar(20),char(2),int(5),bigint(10),int(11),datetime,double,tinyint(1),double).sql | UTF-8 | 928 | 2.953125 | 3 | [] | no_license | CREATE PROCEDURE editEmployee( IN firstName VARCHAR(20), IN lastName VARCHAR(20),
IN email VARCHAR(50), IN address VARCHAR(50), IN password VARCHAR(50),
IN city VARCHAR(20), IN state CHAR(2), IN zipCode INT(5), IN phone BIGINT(10),
... | true |
e428f66148c126c57f3ff003f0c19a81a5fb3eff | SQL | phprao/thinkphp3.2 | /dc_web_api/database/dc_pay_record.sql | UTF-8 | 1,553 | 3.171875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 192.168.1.210
Source Server Version : 50713
Source Host : 192.168.1.210:3306
Source Database : dc_xingyun
Target Server Type : MYSQL
Target Server Version : 50713
File Encoding : 65001
Date: 2018-06-06 14:37:01
*/
SET FOREIGN_KEY_CHEC... | true |
a39139b830f823f14d5728ff7c8b7386f31b85fe | SQL | deepthinatsu/eMart-Final-Project | /DataBase/emartdb (3).sql | UTF-8 | 14,837 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 12, 2020 at 12:19 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
59129767e783af8549b3b8384be1ae2363970bd4 | SQL | rw251/pingr | /deploy/dbserver/scripts/PopulateMedicationTables.sql | UTF-8 | 1,182 | 3.328125 | 3 | [] | no_license | INSERT INTO dbo.drugEventIds ([Event])
SELECT [Event] FROM dbo.[drugEvents.temp] GROUP BY [Event]
EXCEPT SELECT [Event] FROM dbo.drugEventIds;
INSERT INTO dbo.drugIngredients (Ingredient, MaxDose, BNF)
SELECT Ingredient, MIN(MaxDose), MAX(BNF) FROM dbo.[drugEvents.temp] t
INNER JOIN drugsOfInterest i on t.Ingredient ... | true |
7387747ec3ad192fe8d36e43bf6cbb489c7ea90b | SQL | WKD622/ms-sql-project-database | /schema/03-bookings.sql | UTF-8 | 2,772 | 4 | 4 | [] | no_license | /*
* Moduł schematu bazy danych odpowiedzialny za przechowywanie
* informacji o zamówieniach.
*
* @author Kamil Jarosz
* @author Jakub Ziarko
*/
create table BookingStudentIDs (
DayBookingID int not null,
StudentID char(6) not null,
constraint BookingStudentIDsUnique
unique (DayBookingID, StudentID)... | true |
d2341bae1a86922ef10084df585a62c921be64c8 | SQL | Nmarcaud/05-initiation-bdd | /shopping/requetes.sql | UTF-8 | 4,990 | 4.1875 | 4 | [] | no_license | SELECT * FROM user WHERE firstname = 'Romain' AND age = 28;
-- tous les stocks avec prix supérieur à 35 et inférieur à 58
SELECT * FROM stock WHERE price > 35 AND price < 58;
-- moyenne des prix des aliments dispos
SELECT AVG(price) FROM stock WHERE quantity > 0;
-- nom des magasins , aliments et users
SELECT `nam... | true |
13f85c2c48d8218511734a3600c6e032b3b45b14 | SQL | NainzguL/polaris | /db/V1.3.3__competence.sql | UTF-8 | 35,787 | 3.0625 | 3 | [] | no_license | USE polaris;
CREATE TABLE Competence (
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL UNIQUE,
cat_id INT UNSIGNED NOT NULL,
set_id INT UNSIGNED,
base INT,
attr1 VARCHAR(3) NOT NULL,
attr2 VARCHAR(3) NOT NULL,
limiting BIT NOT NULL,
naturalIncrease ... | true |
b31c6af257c046a8874a9b962d48c79b5560128d | SQL | o360/backend | /conf/migrations/common/public/V2017.05.17.13.19__create_answer_tables.sql | UTF-8 | 2,238 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... | true |
fe6195f9cddcc7c155c06c4b6c2a45223e987a07 | SQL | yermochenko/book-catalog | /db/fill_tables.sql | UTF-8 | 614 | 2.671875 | 3 | [] | no_license | INSERT INTO "author"
("id", "first_name", "last_name" ) VALUES
(1 , 'William' , 'Shakespeare'),
(2 , 'Fenimor' , 'Cooper' ),
(3 , 'Jack' , 'London' );
SELECT setval('author_id_seq', 3);
INSERT INTO "book"
("id", "author_id", "title" , "page") VALUES
(1 , 1 , ... | true |
4e4949369726657e0115086e5a05cfaefd17f6ae | SQL | team30pythian/diag_collect | /install.sql | UTF-8 | 1,440 | 3.078125 | 3 | [] | no_license | ----------------------------------------------------------
-- SQL to install DIAG_COLLECT schema
--
-- Need to create
-- a new tablespace
-- a user
-- grant some privileges
-- create objects
--
----------------------------------------------------------
-- Ensure we are the SYS schema
set pages 0
set head of... | true |
f34d142b859114bbc4f243b21c8b8801cba36faa | SQL | KoMinjae/voteApp | /project_data/sql/ddl.sql | UTF-8 | 1,159 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE `vote`.`votecode` (
`num` INT NOT NULL AUTO_INCREMENT,
`sgId` VARCHAR(45) NULL,
`sgName` VARCHAR(45) NULL,
`sgTypeCode` VARCHAR(45) NULL,
`sgVotedate` VARCHAR(45) NULL,
PRIMARY KEY (`num`))
COMMENT = '선거코드';
CREATE TABLE `vote`.`jobcode` (
`jobId` VARCHAR(45) NOT NULL,
`sgId` VARCHAR(45) N... | true |
7e724e904edb7b7d8b1fa38d3ba68279fe1b1858 | SQL | MelvinCastillo/SIGES_app | /Script/PADRES CON TELEFONOS y CEDULA.sql | UTF-8 | 805 | 3.75 | 4 | [] | no_license |
SELECT P.RECORDID,
P.FULLNAME AS NOMBREPACIENTE,
NOMBRECOMPLETO = m.FULLNAME,
PARENTESCO = d.NOMBRE,
EDAD = DATEDIFF(YEAR,M.FNACE,GETDATE()),
SEXO = d.SEXOID
,M.CEDULAID AS CEDULA,
FORMAT(M.FNACE,'dd/MM/yyyy') AS FNACE
,T.TEL1 , T.TEL2 , T.TEL3 ,T.TEL4
FROM [PAX00001] m
LEFT JOIN SMX30003 d ON (m... | true |
6b8b24ee06b9bb12b933cf55494ab21026f8406f | SQL | samkreter/PHP-Postgresql-work | /lab3/lab3.sql | UTF-8 | 4,467 | 3.765625 | 4 | [
"MIT"
] | permissive | /*
Sam Kreter
Sakfy6
Attempting Bonus
*/
DROP SCHEMA IF EXISTS lab3 CASCADE;
CREATE SCHEMA lab3;
CREATE TABLE lab3.building (name varchar(50) NOT NULL,
city varchar(50) NOT NULL,
state varchar(50) NOT NULL,
address varchar(250) NOT NULL,
zipcode varchar(11) NOT NULL,
PRIMARY ... | true |
0bb450c0a0342095691dde46efa3737a18c0404a | SQL | gbinb/chat-web | /sql/chat_msg_file.sql | UTF-8 | 1,712 | 3.125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 172.18.10.210-开发
Source Server Version : 50729
Source Host : 172.18.10.210:3306
Source Database : hn_chat
Target Server Type : MYSQL
Target Server Version : 50729
File Encoding : 65001
Date: 2021-01-11 16:03:59
*/
SET FOREIGN_KEY_CHEC... | true |
66f2635f819239dc2b1ef433eff737f03a12dd45 | SQL | rajeshwarn/WMS | /DataBase脚本/建货物出库表.sql | GB18030 | 496 | 2.703125 | 3 | [] | no_license | create table outbank
(
ⵥ char(30), --
char(20), --
ﵥ float, --ﵥ
char(10), --
smalldatetime, --
int, --
ֿԱ char(20), --ֿԱ
Ա char(20) --ͻԱ
PRIMARY KEY
(
ⵥ,
)
) | true |
06de5ac865146f078b54498f7734d22710db5114 | SQL | soberzhukov/-py-homeworks-db | /DB3/CREATE_WORKER.sql | UTF-8 | 265 | 2.703125 | 3 | [] | no_license | create table if not exists Worker (
Id serial primary key,
Name varchar(20) not null,
Its_boss varchar(20) null
);
create table if not exists Department(
Id serial primary key,
Department_name varchar(30) not null,
Worker_id integer references Worker(Id)
); | true |
9dd85ea30af829f6fca194008e104a907a7117df | SQL | lyoumi/crossworld | /auth-service/etc/migration/1__init.sql | UTF-8 | 1,361 | 3.5625 | 4 | [] | no_license | -- init tables
CREATE TABLE users (
id VARCHAR(256) NOT NULL PRIMARY KEY,
username VARCHAR(256) NOT NULL,
password VARCHAR(256) NOT NULL,
name VARCHAR(256) NOT NULL,
surname VARCHAR(256) NOT NULL,
is_account_non_expired INT,
is_account_non_locked INT,
is_credentials_non_expired INT,
is... | true |
07dfe5962f53d6a240bb626bb9d29783b263399b | SQL | developersDD/DevBOR | /main_database.sql | UTF-8 | 6,396 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 15, 2016 at 01:27 PM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
9fd3653e04f062c41030cbf596e6b2706db56d48 | SQL | 7vqinqiwei/java-design | /src/main/java/com/wayne/design/demo/spring/propogation/log.sql | UTF-8 | 1,184 | 2.890625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80016
Source Host : localhost:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001
Date: 29/05/2020 ... | true |
4b1e46769d14dd58f0653fcef6752186931d4727 | SQL | spbull/data-science | /fundamentals/data/basic_sql_statements.sql | UTF-8 | 6,722 | 4.78125 | 5 | [] | no_license | -- Creating a database
-- CREATE DATABASE IF NOT EXISTS netflix;
-- Using a specific database
USE netflix;
-- Create the table movies if it does not already exist
CREATE TABLE IF NOT EXISTS movies (
id INT,
title VARCHAR(255),
director VARCHAR(100),
... | true |
4015a9fafbd1bce723c229efa7efc465e05bb970 | SQL | brendafrias/TrainingKit-T-SQL | /Pruebas de SQL/Unidad1.sql | UTF-8 | 3,819 | 3.921875 | 4 | [] | no_license |
--EJERCICIO 1 --
--La instruccion USE garantiza que esta conectado a la base de datos de destino--
USE TSQL2012;
--La clausula SELECT proyecta los atributos de Sales--
SELECT shipperid, companyname, phone
FROM Sales.Shippers;
--FROM indica la tabla Sales.Shippers es la tabla consultada
--Esto podria dar u... | true |
5544bd5104683b2ea621bb41839846b770f0d760 | SQL | UrosVukovic997/ISA-PSW2019-20 | /src/main/resources/data.sql | UTF-8 | 12,068 | 2.609375 | 3 | [] | no_license | INSERT INTO klinika (naziv, grad, ocena)
VALUES ('NS_KLINIKA', 'Novi Sad', '7');
INSERT INTO klinika (naziv, grad, ocena)
VALUES ('KBC', 'Beograd', '9');
INSERT INTO lekar (first_name, last_name, email, spec, username, password, klinika_id, home_adress, description,prosecna_ocena)
VALUES ('Jovan', 'Jovanovic', 'mark... | true |
d65f72161ca0b92136745a55cf073195066af2fe | SQL | nachomartinez30/CCExeCNF | /Masters Query/TablasIndividuales/CARBONO_CoberturaDoselCons.sql | UTF-8 | 1,108 | 3.171875 | 3 | [] | no_license | SELECT
coberturaDosel.UPMID,
coberturaDosel.SitioID,
coberturaDosel.CoberturaDoselID,
-- _____________________________________________________________________________________________________________________________________________________________________________________________
sitio.Sitio,
upmMala.Estado,
upmMala.Muni... | true |
e160884b481dffafae60aa89ab103ed6a717c3bf | SQL | sipakhti/POSTgres-sipakhti | /IM DB/Film_with_smallest_cast.sql | UTF-8 | 221 | 3.953125 | 4 | [] | no_license | --Find the film(s) with the smallest cast.
SELECT m.name as movie_name, count(mc.pid) as cast_strength
FROM m_cast as mc INNER JOIN movie as m
ON mc.mid = m.id
GROUP BY mc.mid, m.name
ORDER BY cast_strength asc
LIMIT 1 | true |
e1d7ed100a2a672edc2d520a5b0c67cbb8412c19 | SQL | gantakoradevaraju/Database-Proj | /Database1/qa/Tables/SubJobControl.sql | UTF-8 | 809 | 2.671875 | 3 | [] | no_license | CREATE TABLE [qa].[SubJobControl] (
[SubJobControlID] INT IDENTITY (1, 1) NOT NULL,
[JobControlID] INT NOT NULL,
[SubJobName] VARCHAR (1000) NOT NULL,
[SubJobStartTime] DATETIME NOT NULL,
[SubJobEndTime] DATETIME NULL,
... | true |
855bcf8d2967d4a84f93ecfd5524c10a769c5c1a | SQL | barbotsoftware/barbotweb | /sql/migrations/add_garnish_tables_1.009.sql | UTF-8 | 2,319 | 4.125 | 4 | [] | no_license | -- START OF UPDATE SCRIPT --
-- Adds Garnish tables to barbotdb schema
DROP PROCEDURE IF EXISTS `do_current_update_script`;
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `do_current_update_script`(
migration VARCHAR(255),
version VARCHAR(50),
created_at DATETIME
)
BEGIN
DECLARE count_rows INT;
S... | true |
d0fdeffd6ab1a2ad39b9b8d978c0204481a4df8e | SQL | cheonsoo/MANSOO_LAB | /quiz/11st/no_3/test2.sql | UTF-8 | 901 | 4.28125 | 4 | [] | no_license | SELECT A.team_id AS team_id, A.team_name AS team_name, sum( ( A.num_points + B.num_points ) ) AS num_points
FROM (
SELECT T.team_id, T.team_name, sum(
CASE
WHEN M.host_goals > M.guest_goals THEN 3
WHEN M.host_goals = M.guest_goals THEN 1
ELSE 0
... | true |
ae88875c1c9cd0a86269d0a751f65e4457562ea6 | SQL | MaitRaidmae/AppAnalyzerPLSQL2 | /P_APPLICATIONS.sql | UTF-8 | 2,295 | 2.78125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Package P_APPLICATIONS
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE PACKAGE "HUNDISILM"."P_APPLICATIONS"
IS
-----------------------------------------------------------------------------
PROCEDURE UPDAT... | true |
b00f2092c5fdf0f6877f602c4f5b08aec55560fc | SQL | ericLavachery/mpg-node-mysql | /categories.sql | UTF-8 | 3,462 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 23, 2019 at 08:46 PM
-- Server version: 5.7.24
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
61fd16151e7f12b71ca32ef175500cd9209c9876 | SQL | dpouls/sunny-instagram | /db/post/get_my_posts.sql | UTF-8 | 80 | 2.90625 | 3 | [] | no_license | select *
from posts p
join users u on u.id = p.author_id
where author_id = ($1) | true |
ebc0914118db3b63956b911d78e88e4d8e142822 | SQL | senthuran82/SQLScripts | /Move.sql | UTF-8 | 800 | 2.671875 | 3 | [] | no_license | EXEC xp_cmdshell 'Dir C:\Test'
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', 1
RECONFIGURE
CREATE TABLE #test
(
Output_1 NVARCHAR (2000)
)
INSERT INTO #test
EXEC xp_cmdshell 'Dir C:\Test'
SELECT *
FROM #test
EXEC xp_dirtree 'C:\Test', 0, 1
CREATE T... | true |
99b5758ab89dc5a9344638a1ae35b9079960c7d9 | SQL | caiocesarstx/nobank-springboot | /sql/proposals_generator.sql | UTF-8 | 732 | 3.015625 | 3 | [] | no_license | INSERT INTO proposal (
id, address, created_at, "document", email, "name", salary, status, updated_at
)
select
md5(random()::text || clock_timestamp()::text)::uuid as id
,'Rua das Tabajaras, ' || floor(random() * 9999)::int as address
,localtimestamp as created_at
,left(md5(r... | true |
457b45573af4a0b557f5bdac2235a9e3a9633566 | SQL | unistaja/cookbook | /backend/src/main/resources/db/migration/V10__Make_username_unique_and_user-recipeId_into_primary_key_for_rating.sql | UTF-8 | 129 | 2.75 | 3 | [] | no_license | ALTER TABLE User MODIFY COLUMN username varchar(30) UNIQUE;
ALTER TABLE Rating DROP COLUMN id, ADD PRIMARY KEY(userId, recipeId); | true |
84b4692f8f02630bfd621a38259a600222e431c7 | SQL | sideshowbandana/components | /db/structure.sql | UTF-8 | 1,247 | 3.609375 | 4 | [] | no_license | CREATE TABLE `component_event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`component` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`component_version` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`recorded_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`received_timestamp`... | true |
36ecb928cbf7eb33104c99b5d1364c0cc09c62f5 | SQL | bellasanjaya/perpustakaan | /db_perpus.sql | UTF-8 | 6,793 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 13, 2015 at 08:10 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
9e2d6cd1ccb2913ad025cdaf453a0a853afaa6de | SQL | EminjanO/PHP_Cours | /1_TP/TP_01/p2.sql | UTF-8 | 2,452 | 4.375 | 4 | [] | no_license | /* combien combiencombiencombiend'étudiants? */
SELECT
COUNT(*) AS nbr
FROM
etudiants;
/* combien d'étudiants en 1TL1 ? */
SELECT
COUNT(*) AS 1TL1
FROM
etudiants
WHERE
classe = '1TL1';
/* combien d'étudiants dans tous les "groupes" */
SELECT
Classe, COUNT(*) AS nbr
FROM
etudiants
GROUP BY C... | true |
e045319ada5a0937e312164a8d0ad598fc25aac0 | SQL | artaviapcarlos/ProyectoBD2017 | /ProyectoBD2017/Datos (inserts).sql | ISO-8859-1 | 3,731 | 3.125 | 3 | [] | no_license | use BD_OutletAntiguedadesColonial;
-- Inserts Personas
INSERT INTO Persona VALUES ('403165495', 'Sergio', 'Chavarria', 'Ortega', 'sergio.chavarria@gmail.com', 'M', '1982-04-23', 'Mingo');
INSERT INTO Persona VALUES ('116390735', 'Jose', 'Artavia', 'Moya', 'jose.artavia@gmail.com', 'M', '1996-04-23', 'Mingo');
... | true |
de01bc2f87adb629803748b116495da92d39fbc5 | SQL | staser/country-list | /country/icu/ta/language.mysql.sql | UTF-8 | 42,686 | 2.734375 | 3 | [
"MIT"
] | permissive | CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `country` (`id`, `name`) VALUES ('afh', 'அஃப்ரிஹிலி');
INSERT INTO `country` (`id`, `name`) VALUES ('afa', 'அஃப்ரோ-ஏசியாடிக் மொழி');
INSERT INTO `cou... | true |
217982b931c2aab41e547a48fc09aedb954c822a | SQL | sislam16/Pursuit-Core-Web-pg-promise-Lab | /backend/seed.sql | UTF-8 | 791 | 3.640625 | 4 | [] | no_license | DROP DATABASE class_db;
CREATE DATABASE class_db;
\c class_db;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
firstname VARCHAR,
lastname VARCHAR,
age INT
);
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
poster_id INT REFERENCES users(id),
body VARCHAR
);
-- likes table
CREATE TABLE like... | true |
6d489c5e7bcc88c40706aeb805fe1f8a6d1c21b8 | SQL | DepartmentCustomization/SBC | /CRM-AVR/Conf/DataSources/System.Data.SqlClient/Default/All_Default/Claims/avr_select_class_with_type/avr_select_class_with_type.sql | UTF-8 | 138 | 2.84375 | 3 | [] | no_license | select
--cc.Id ,
cc.Name
from Claim_types ct
left join Claim_classes cc on cc.Id = ct.Claim_class_ID
where ct.Id = @types_id
return; | true |
d548f5afe5d581bf2ce2ad796d9107e2e81570db | SQL | dmaisano/NJIT-CS | /CIS-278/notes/oct18.sql | UTF-8 | 1,230 | 3.375 | 3 | [] | no_license | CREATE TABLE copy_d_cds
AS SELECT * FROM d_cds;
/*
CREATE TABLE copy_d_cds
AS (SELECT * FROM d_cds);
*/
INSERT INTO copy_d_cds
(cd_number, title, producer, year)
VALUES(97, 'Celebrate the Day', 'R & B Inc.', 2003);
INSERT INTO copy_d_cds
(cd_number, title, producer, year)
VALUES(98, 'Holiday Tunes f... | true |
2951b3e4d0a5ec063de9c934965bf4780568c6e0 | SQL | ericlaw1979/CodeMash2015 | /Get Shipping with Docker/Lab 3/dockerfiles/wls12.1.2/wls12120/oracle_common/common/sql/svctbl/sql/cresvctbl.sql | UTF-8 | 712 | 2.921875 | 3 | [] | no_license | Rem
Rem cresvctbl.sql
Rem
Rem Copyright (c) 2012, Oracle. All rights reserved.
Rem
Rem NAME
Rem cresvctbl.sql - SQL script to create ServiceTable schema.
Rem
Rem DESCRIPTION
Rem This file creates the database schema for ServiceTable.
Rem
Rem NOTES
Rem
Rem MODIFIED (MM/DD/YY)
Rem znazib ... | true |
c3090b3d82cc775b9cc3fe9a6a1204d7ba802287 | SQL | FlagBg/Project | /electromer.sql | UTF-8 | 7,483 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 01, 2016 at 04:04 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
e8684e1a1e51f175845e11868cb52527635e6915 | SQL | vladrus13/ITMO | /Databases/cw/solves/solved/3.1.sql | UTF-8 | 98 | 2.9375 | 3 | [] | no_license | delete from Runs
where SessionId in (select s.SessionId from Sessions s where s.TeamId = :TeamId)
| true |
9e5ca8940d1123c7048506d5cbfa85de46a84fc1 | SQL | RachelBdeS/RachelBdeS.github.io | /TP_Web_reparTout/sql/bdd.sql | UTF-8 | 4,771 | 3.78125 | 4 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS repartout;
CREATE DATABASE repartout CHARACTER SET utf8 COLLATE utf8_general_ci;
USE repartout;
-- Désactive les contraintes des clés étrangères
SET FOREIGN_KEY_CHECKS=0; /* Désactive le control des relations entre les tables. Permet de modifier des tables sans respecter les critères d'ordre d... | true |
8ff29be8b47c76e43cc73a44504817e131be2b49 | SQL | SA-Inc/SQL-EX-ru-Notes-and-Solutions | /50.sql | UTF-8 | 186 | 3.421875 | 3 | [] | no_license | -- Find the battles in which Kongo-class ships from the Ships table were engaged.
SELECT DISTINCT o.battle
FROM Ships AS s
JOIN Outcomes AS o ON o.ship = s.name
WHERE s.class = 'Kongo'
| true |
7a6ea26b9dac8e9675b2c87f517ee48c17ad46ab | SQL | Saipheddine/BibliothekDB | /bibliothek.sql | UTF-8 | 866 | 3.4375 | 3 | [] | no_license | create database bibliothek;
drop table if exists leser;
create table leser
(
leser_id int unsigned auto_increment primary key,
vorname varchar(30) not null,
nachname varchar(30) not null
);
drop table if exists buecher;
create table buecher
(
buch_id int unsigned auto_increment primary ... | true |
72225fae3cef2286d55fdce311a319c220e26210 | SQL | mrshahidmiah/LDC | /SQL/SQL test.sql | UTF-8 | 914 | 4.5625 | 5 | [] | no_license |
-- Given the following tables, write a query which returns the total footfall count per premises.
-- The resultset should contain the following non-null columns:
-- Business, StreetNo, Street, PostCode, FootfallCount.
-- Premises do not necessarily have footfall for every week (missing counts will have a count... | true |
b466ceef4e54a89e6cdf1768d2ffef38a41516a8 | SQL | KenosSGI/org.kenos.idempiere.lbr | /org.kenos.idempiere.lbr.migration/migration/i4.1/oracle/201805172244_FixBrokenReferences.sql | UTF-8 | 1,271 | 2.5625 | 3 | [] | no_license | SET SQLBLANKLINES ON
SET DEFINE OFF
-- Fix Table References w/o a Reference Value (changed to Table Direct)
-- 17/05/2018 22h34min16s BRT
UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2018-05-17 22:34:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1128623
;
-- 17/05/2018 22h34min28s ... | true |
04f04dc318813f5a3f3fde6a806e555da176db31 | SQL | prasanth260295/mysql | /coresoft-product-database/src/main/resources/oracle/4.3.0-19/Deposits_Create_Customer_Bond_Redemption_5.sql | UTF-8 | 793 | 2.84375 | 3 | [] | no_license | CREATE TABLE CUSTOMER_BOND_REDEMPTION
(
UNIQUE_ID NUMBER(10,0) NOT NULL,
BOND_SERIES VARCHAR2(30 BYTE) NOT NULL,
BOND_NUMBER VARCHAR2(30 BYTE) NOT NULL,
BOND_ISSUE_DATE DATE NOT NULL,
BOND_REDEMPTION_DATE DATE NOT NULL,
BOND_VALUE NUMBER(20,5) NOT NULL,
INTEREST_A... | true |
5c1c6b5074208fbb93d0a622303d29050cbdeeb3 | SQL | kiranrajpv/test-sql | /src/main/resources/sql/drop_all_tables.sql | UTF-8 | 2,073 | 3.765625 | 4 | [] | no_license | ALTER SESSION SET CURRENT_SCHEMA = HR
/
CREATE OR REPLACE PROCEDURE raise_emp_salary (column_value NUMBER,
emp_column VARCHAR2, amount NUMBER) IS
v_column VARCHAR2(30);
sql_stmt VARCHAR2(200);
BEGIN
/*determine if a valid column name has been given as input a cicd script*/
... | true |
341a0739307f2b40c2963c4d9c545ac638542259 | SQL | danishrashidin/carsgit | /sql/cars.sql | UTF-8 | 12,554 | 3.484375 | 3 | [] | no_license | CREATE DATABASE cars;
USE cars;
CREATE TABLE College (
College_ID INT UNSIGNED NOT NULL PRIMARY KEY,
College_Name CHAR (50) NOT NULL
);
CREATE TABLE Student (
Student_ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
College_ID INT UNSIGNED NOT NULL,
Full_Name varchar(255) NOT NULL,
... | true |
7aad5e1d1df40d6a3cd4baef4c4c6edffd2ee22e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day12/select1101.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-11T11:01:00Z' AND timestamp<'2017-11-12T11:01:00Z' AND temperature>=47 AND temperature<=96
| true |
cdf1969f5e06f7853dd75fe2227c2afefda1f200 | SQL | mallarangeng/gapura_hrm | /database/gapura_hrm.sql | UTF-8 | 26,929 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2017 at 02:44 AM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
06a6acdff02f98960ff3c3fbff07a7b250549975 | SQL | SKOMOBO/server | /DB_schema/box_info.sql | UTF-8 | 225 | 2.515625 | 3 | [
"MIT"
] | permissive | CREATE TABLE `box_info` (
`ID` TEXT NOT NULL,
`processor` TEXT NULL,
PRIMARY KEY (`ID`(4))
)
COMMENT='this is the table storing all the data about the individual SKOMOBO boxes.'
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;
| true |
2f3fee388db7f26c7de1bf7fe58abec3407247fc | SQL | Fossa-bnb/reservation-service | /db/schema.sql | UTF-8 | 602 | 3.546875 | 4 | [] | no_license | CREATE DATABASE reservations;
\connect reservations;
CREATE TABLE listings (
id SERIAL UNIQUE PRIMARY KEY,
minimum_stay INTEGER NOT NULL,
maximum_guests INTEGER NOT NULL
);
CREATE TABLE dates (
id SERIAL UNIQUE PRIMARY KEY,
month INTEGER NOT NULL,
day INTEGER NOT NULL,
year INTEGER NOT NULL,
date date... | true |
fe8847c77acc8f92a8df8480458ddac483ca6b7e | SQL | morkeltry/GAP-microfinance | /server/db_build.sql | UTF-8 | 4,968 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... | true |
554b8809bcc2ee94a22dd1edc0f01da25b566711 | SQL | mariaplakia/MyRepo | /intelligencia_assign/terms_df.sql | UTF-8 | 383 | 2.59375 | 3 | [] | no_license | -- Table: public.terms_df
-- DROP TABLE public.terms_df;
CREATE TABLE public.terms_df
(
short_form text COLLATE pg_catalog."default",
efo_label text COLLATE pg_catalog."default",
iri text COLLATE pg_catalog."default",
CONSTRAINT short_form UNIQUE (short_form)
)
WITH (
OIDS = FALSE
)
TABLESPACE pg... | true |
b6ebc3ea85f14596e00e08288026bf0a7e70a4b8 | SQL | xiaohong321/sample-collection | /document/sample_collections.sql | UTF-8 | 15,008 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : 本地数据库
Source Server Type : MySQL
Source Server Version : 50727
Source Host : localhost:3306
Source Schema : sample_collections
Target Server Type : MySQL
Target Server Version : 50727
File Encoding : 65001
Date: 06/07/... | true |
990f14091a6e087df775fc438e7afbe31350ca5d | SQL | JellyBest/git | /spider/sql/mmtj_url.sql | UTF-8 | 3,304 | 2.671875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50710
Source Host : localhost:3306
Source Database : dadan
Target Server Type : MYSQL
Target Server Version : 50710
File Encoding : 65001
Date: 2018-07-10 22:34:46
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
2efdd82b4bb649062139f8884c9540514496915f | SQL | fengzhu2013/leadingStudy | /demand/insert.sql | UTF-8 | 1,405 | 3.078125 | 3 | [] | no_license | --
-- 转存表中的数据 `province`
--
INSERT INTO `province` (`provinceId`, `province`) VALUES
(11,'北京市
'),(12,'天津市
'),(13,'河北省
'),(14,'山西省
'),(15,'内蒙古自治区
'),(21,'辽宁省
'),(22,'吉林省
'),(23,'黑龙江省
'),(31,'上海市
'),(32,'江苏省
'),(33,'浙江省
'),(34,'安徽省
'),(35,'福建省
'),(36,'江西省
'),(37,'山东省
'),(41,'河南省
'),(42,'湖... | true |
4e3c6dcc08b89e433840ee73f2c8b22edb5dddf0 | SQL | jestradasal/216finalproject | /sql_create/convertCSVtoSQL.sql | UTF-8 | 2,356 | 3.328125 | 3 | [] | no_license | \copy sat_scores(county, math_2011, cr_2011, writing_2011, total_2011,
math_2012, cr_2012, writing_2012, total_2012,
math_2013, cr_2013, writing_2013, total_2013,
math_2014, cr_2014, writing_2014, total_2014,
math_2015, cr_2015, writing_2015, total_2015,
math_2016, cr_2016, writing_2016, total_2016,
erw_2017, math_2017... | true |
51f666decbbcf847eaddbca0f8c5d6a1633b299b | SQL | arkasozi/Pewlett-Hackard-Analysis | /Employee_Database_challenge.sql | UTF-8 | 2,673 | 4.40625 | 4 | [] | no_license | -- Creating tables for Employee_Database_Challenge
CREATE TABLE departments (
dept_no VARCHAR(4) NOT NULL,
dept_name VARCHAR(40) NOT NULL,
PRIMARY KEY (dept_no),
UNIQUE (dept_name)
);
CREATE TABLE employees (
emp_no INTEGER NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR(40) NOT ... | true |
ef02c47a5a9365861377c3b3f59483ebf800a931 | SQL | letusfly85/db-accessor | /src/main/resources/query/erd/mainte/tool/MERGE_MS_IND_COLUMNS.sql | UTF-8 | 1,313 | 2.78125 | 3 | [] | no_license | MERGE INTO MS_IND_COLUMNS
USING DUAL
ON (
/* TODO */
)
-- 既存レコードの更新
WHEN MATCHED THEN
UPDATE SET
INDEX_NAME = ? /* 1, INDEX_NAME */
,REVISION = ? /* 2, REVISION */
,TABLE_ID = ? /* 3, TABLE_ID */
,COLUMN_ID = ? /* 4, COLUMN_ID */
,COLUMN_NAME = ? ... | true |
3d5e3d6e426a509a0a58fc97857b982867b56d10 | SQL | kvsaimadhav/CPS541-Research | /hw8.sql | UTF-8 | 25,129 | 4.09375 | 4 | [] | no_license | -- CPS 541 HW 8 VENKATA SAI MADHAV KAZA
-- cr-company.sql
-- creates the COMPANY DB-schema
-- part 1
-- ALSO SEE figures 4.1 and 4.2 of Text (Elmasri 6th Ed.)
-- keep these two commands at the top of every sql file
set echo on
set linesize 120
drop table Employee cascade constraints;
commit;
create t... | true |
2bf76288863328ee760b18ead4d80c2d72327169 | SQL | 748826371/Jsp-ScoreManagementSystem | /test.sql | UTF-8 | 4,401 | 3.46875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50553
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-12-20 15:04:06
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... | true |
0ead20ba91496231cb26cc581f0369f004b1d3d4 | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/#CORE_RULEENGINE#RuleInsertEventVariable.sql | UTF-8 | 762 | 3.109375 | 3 | [] | no_license | DROP procedure IF EXISTS `RuleInsertEventVariable`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `RuleInsertEventVariable`(eventId BIGINT,event_var_name VARCHAR(80), var_reference VARCHAR(20),default_value VARCHAR(255),non_editable TINYINT(1), OUT statusCode INT)
root: BEGIN
DECLARE varTypeId BIGIN... | true |
fa90c8bba100ee620eb53c74e30a1650b251620a | SQL | mwcaisse/car-tracker-server | /CarTracker/Database/Scripts/Deployments/MIGRATE_TRIP_STATUS_TO_INT.sql | UTF-8 | 1,222 | 4.125 | 4 | [
"MIT"
] | permissive | ALTER TABLE TRIP
ADD COLUMN STATUS_OLD VARCHAR(50);
UPDATE TRIP
SET STATUS_OLD = STATUS;
ALTER TABLE TRIP
DROP FOREIGN KEY TRIP_ibfk_2;
DROP TABLE TRIP_STATUS;
CREATE TABLE TRIP_STATUS (
ID INT NOT NULL,
NAME VARCHAR(50) NOT NULL,
DESCRIPTION VARCHAR(500) NOT NULL,
CREATE_DATE DATETIME NOT NULL ... | true |
ed5edc0394e86cd1daed35c631c6bbb2a80b4f8c | SQL | danieljfgoncalves/lapr3-bd-scripts | /functions.sql | ISO-8859-1 | 6,429 | 3.875 | 4 | [] | no_license | -- Authors
--
-- Daniel Gonalves - 1151452
-- Eric Amaral - 1141570
-- Ivo Ferro - 1151159
-- Tiago Correia - 1151031
-- get all projects
CREATE OR REPLACE FUNCTION FC_GET_PROJECTS
RETURN SYS_REFCURSOR
IS
C1 SYS_REFCURSOR;
BEGIN
OPEN C1 FOR
SELECT ID_PROJECT, NAME, DESCRIPTION
FROM PROJECT;
RETURN C1;
... | true |
e8a1719e4526a0e888e465220e9be1fdf7cf3f61 | SQL | RogerDavidCruz/code-wars | /#_The_Post_RC_Saga_Training/SQL_practice/6kyu_codewars/6kyu_SQL_Basics_Simple_JOIN_and_RANK.sql | UTF-8 | 725 | 4.4375 | 4 | [] | no_license | -- 6 kyu - SQL Basics: Simple JOIN and RANK
-- https://www.codewars.com/kata/58094559c47d323ebd000035/train/sql
--
-- For this challenge you need to create a simple SELECT statement that will return all columns from the people table, and join to the sales table so that you can return the COUNT of all sales and RANK eac... | true |
6bbdb4b31b9bbf82a5090ea494c724f719fa0784 | SQL | Raymond2129/Bamazon | /schema.sql | UTF-8 | 370 | 3.359375 | 3 | [] | no_license | -- Need to create a database
CREATE DATABASE bamazon;
-- Need to use the database
USE bamazon;
-- Need to create a table with 5 columns
CREATE TABLE products (
id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(50) NOT NULL,
department_name VARCHAR(50) NOT NULL,
price DECIMAL(6,2) DEFAULT 0,
sto... | true |
925ea565ed9c9bc933a4a75626ea9c50972c6175 | SQL | maquiavelo79/bodyflex | /dataBase/[SP]/SP_CAT_SLD_CSU_T2.sql | ISO-8859-3 | 1,816 | 3.8125 | 4 | [] | no_license | CALL SP_CAT_SLD_CSU_T2(@codErr);
SELECT @codErr;
-- select * from CATALOGO_SLIDER2
-- select * from COLECCION
DROP PROCEDURE IF EXISTS bodyflex.SP_CAT_SLD_CSU_T2;
CREATE PROCEDURE bodyflex.`SP_CAT_SLD_CSU_T2`(OUT codErr INTEGER)
BEGIN
-- DECLARE EXIT HANDLER FOR SQLEXCEPTION SET codErr=99;
SET codErr=0;
I... | true |
f4aad2b02be94b0fc95da63c25112cea0a3f61b0 | SQL | Djan20/sql-scratch-capstone-turn-in | /Warby Parker/code.sql | UTF-8 | 482 | 4.28125 | 4 | [] | no_license | SELECT *
FROM survey
LIMIT 10;
SELECT question,
COUNT(DISTINCT user_id)
FROM survey
GROUP BY question;
SELECT *
FROM quiz
LIMIT 5;
SELECT *
FROM home_try_on
LIMIT 5;
SELECT *
FROM purchase
LIMIT 5;
SELECT DISTINCT q.user_id,
h.user_id IS NOT NULL AS 'is_home_try_on',
h.number_of_pairs,
p... | true |
da4d6ea8915b013a9ae86a025c65f1d50e7f1641 | SQL | felipemoz/oracle-toolkit | /status_30.sql | UTF-8 | 599 | 3.71875 | 4 | [] | no_license |
SELECT *
FROM
(
SELECT NVL(event,'CPU') event
, COUNT(1)
FROM gv$active_session_history
WHERE sample_time > SYSDATE - 1/24/60*30 -- 30 minutos
GROUP BY event
ORDER BY 2 DESC
)
WHERE rownum < 6
/
BREAK ON INST_ID SKIP 1
SELECT *
FROM
(
SELECT inst_id
, NVL(event,'CPU') event
, ... | true |
50abcc6f73d9159a4527047a4c5fcb8565993de0 | SQL | chinasoftinc/limit | /limit-core/src/main/java/com/athena/module/dictionaries/sql/t_dictionaries.sql | UTF-8 | 1,414 | 3.53125 | 4 | [] | no_license | CREATE TABLE T_DICTIONARIES
(
ID NUMBER(20) NOT NULL,
OPT_NAME VARCHAR2(50) DEFAULT 'NA' NOT NULL,
OPT_KEY VARCHAR2(50) DEFAULT 'NA' NOT NULL,
OPT_VALUE VARCHAR2(255) DEFAULT 'NA' NOT NULL,
OPT_PARENT_ID NUMBER(20) DEFAULT 0 NOT NULL,
OPT_DESCRIPTION VARCHAR2(255) DEFAULT '' NOT NULL,
OPT_SORT_NO NUMBER(3) NOT... | true |
f496b5410298ca0b1aad578f5a76a8e70b23b0c3 | SQL | dandraden/Database-Scripts | /Oracle/others/user_script/trg_cad_resumo_valores_02.sql | ISO-8859-1 | 5,056 | 3.171875 | 3 | [] | no_license | /* Formatted on 2005/11/10 17:21 (Formatter Plus v4.8.0) */
CREATE OR REPLACE TRIGGER ifrbde.trg_cad_resumo_valores_02
AFTER INSERT OR UPDATE OF val_pago,
dat_moeda,
tip_moeda,
val_termo,
val_res... | true |
bec974d7c40b6c2b3da3ecabb177513306e74278 | SQL | BrenPatF/plsql_profiling | /dprof/dprof_queries.sql | UTF-8 | 6,649 | 3.515625 | 4 | [
"MIT"
] | permissive | DEFINE RUN_ID=&1
/***************************************************************************************************
Name: dprof_queries.sql Author: Brendan Furey Date: 21-Jun-2020
Query script component in the PL/SQL Profiling module.
The module demonstrates the use of Oracle's ... | true |
319cbcbcca61c54b314628dcff1599e681b40aa6 | SQL | bellmit/practicas_empresa | /opentach-server-core/target/classes/sql/sessionstatus/driversVehiclesWithoutDownload.sql | UTF-8 | 537 | 3.25 | 3 | [] | no_license | select
cg_contrato,
idorigen,
f_descarga_datos,
dias
from cdvinform_penddescarga
where f_descarga_datos is not null
#WHERE_CONCAT#
/*
select
usu.USUARIO,
dfemp.nomb as EMPRESA
from
cdusu usu,
(select cdlogsesion.USUARIO from cdlogsesion where #TIME_FILTER#) loguser,
cdusu_dfemp,
df... | true |
0fc0df57ae0c1a67b490426ce34ff8f5af1b6004 | SQL | yashin-alexander/itmo | /course_3/helper-concierge/databases/cassandra/create_db.sql | UTF-8 | 3,761 | 3.21875 | 3 | [] | no_license | DROP KEYSPACE concierge;
CREATE KEYSPACE concierge WITH REPLICATION = {
'class' : 'SimpleStrategy',
'replication_factor' : 3
};
use concierge;
CREATE TABLE IF NOT EXISTS attempts_to_enter_by_day
(
day date,
user_id uuid,
device_type text,
event_time timestamp,
PRIMARY KEY((day, user_id), eve... | true |
82a00d40eb2a3be6ca1b9975186298da99a683c1 | SQL | Lanottez/IC_BA_2020 | /1st Term/Fundamentals_of_Database_Technologies/Mock Exams/Practice Exam 3/Quaries (Final).sql | UTF-8 | 3,004 | 4.4375 | 4 | [] | no_license | Mock Exam 3
Question 1
Yes, such as the relationship between alliances and countries. An alliances could be corresponding to multiple countries, and a country could be corresponding to multiple alliances. The table countries_in_alliances is the junction table between alliances and countries.
Question 2
No, becuase th... | true |
8b51dd8dadfce335d7836e373ee6f785edac7392 | SQL | PilarM0ntes/sql-challenge | /EmployeeSQL/schemata.sql | UTF-8 | 1,255 | 4.15625 | 4 | [] | no_license | -- Drop table if exists
DROP TABLE IF EXISTS departments;
DROP TABLE IF EXISTS titles;
DROP TABLE IF EXISTS employees;
DROP TABLE IF EXISTS departments;
-- Create a table of departments
CREATE TABLE departments (
dept_no VARCHAR(4) PRIMARY KEY,
dept_name VARCHAR(255)
);
-- Create a table of titles
CREATE TABLE titl... | true |
6b7dd0bd1de3366dafc4457acb68efdae12abff5 | SQL | w01f/VolgaTeam.SalesLibrary | /WebSalesLibraries/protected/data/tables/wallbin/tbl_favorites_link.sql | UTF-8 | 477 | 2.796875 | 3 | [] | no_license | DROP TABLE IF EXISTS `tbl_favorites_link`;
CREATE TABLE IF NOT EXISTS `tbl_favorites_link` (
`id` varchar(36) NOT NULL,
`id_link` varchar(36) NOT NULL,
`id_library` varchar(36) NOT NULL,
`id_folder` varchar(36) NULL,
`id_user` varchar(36) NOT NULL,
`name` varchar(512) NULL,
`order` int(11) NOT NULL DEFAUL... | true |
3a810d1334122536908388c4db83735a899f9096 | SQL | Kanedevops97/Java_Code_challenge | /src/main/resources/db.sql | UTF-8 | 1,557 | 2.9375 | 3 | [] | no_license | create database customers;
DROP TABLE IF EXISTS customers_transaction;
CREATE TABLE customers_transaction (
cust_id INT NOT NULL AUTO_INCREMENT,
cust_name VARCHAR(100) NOT NULL,
transaction_date DATE NOT NULL,
transation_value INT NOT NULL,
PRIMARY KEY (cust_id));
INSERT INTO customers_transaction(... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.