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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cb7f8090459a92c678f36bdb97cc0510edc0c6d6 | SQL | JoanesMiranda/CompraPagSeguro | /arquivos/compraspagseguro.sql | UTF-8 | 2,234 | 3.0625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 19-Jun-2017 às 21:50
-- Versão do servidor: 5.6.26-log
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... | true |
765069b558650a804af8acde4e1d9673f01372df | SQL | gloaec/meteo | /doc/previsions_standard.sql | UTF-8 | 3,088 | 3.953125 | 4 | [] | no_license | -- ---------------------------------- --
-- Paramètres --
-- ---------------------------------- --
SET @rapport_type := 'standard'; -- ou 'plages' ou 'neiges' /!\ PAS IMPLÉMENTÉ
SET @zone := 'france'; -- ou 'paris' ou 'monde'
SET @nom := 'Atlantique'; -- || 'Cors... | true |
5bd49ca98914be207f69602579159355ec495406 | SQL | whitejokeer/U-shop | /serverside/src/database/ushop1.sql | UTF-8 | 2,095 | 2.984375 | 3 | [] | no_license | CREATE DATABASE "ushop1" WITH TEMPLATE = template0;
\connect "dbname='ushop1'"
SET client_encoding
= 'UTF8';
COMMENT ON DATABASE "ushop1" IS 'Base de datos U-SHOP';
CREATE TABLE universidades
(
id_universidad SERIAL PRIMARY KEY,
nombre_universidad VARCHAR(64),
direccion VARCHAR(64),
ciudad VARCHAR(6... | true |
24bb809c7e755583b58919f0c7055a5e1592619b | SQL | loveingenioustech/data | /oracle/functions/getTokenTest.sql | UTF-8 | 3,812 | 3.140625 | 3 | [] | no_license | DECLARE
vglNotesString VARCHAR2(2000);
FUNCTION getToken(pString IN VARCHAR2,
pPosition IN INTEGER,
pDelimiter IN VARCHAR2 DEFAULT ';',
pNullVal IN VARCHAR2 DEFAULT 'n/a') RETURN VARCHAR2 IS
sLine VARCHAR2(2000);
iStartPos INTEGER;
i... | true |
5ff618c6415e09b8da9d3e9fecb563734d448dda | SQL | mjplacroix/cassini_mission_2 | /build.sql | UTF-8 | 629 | 2.65625 | 3 | [] | no_license | -- CREATE DATABASE enceladus;
\c enceladus
drop table if exists events cascade;
drop table if exists teams cascade;
drop table if exists targets cascade;
drop table if exists spass_types cascade;
drop table if exists requests cascade;
drop table if exists event_types cascade;
drop table if exists master_plan;
creat... | true |
26914de11865e0da61c44823d595ac624ee29464 | SQL | diiina/database_course_2020 | /Zemlyanoy/hw5/create_positions.sql | UTF-8 | 262 | 2.640625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `zemlyanoy_db`.`positions` (
`position_id` INT NOT NULL AUTO_INCREMENT,
`position_name` VARCHAR(45) NOT NULL,
PRIMARY KEY (`position_id`))
ENGINE = InnoDB
COMMENT = 'Table of positions in the supposed company that can be held.'
; | true |
17d9a6489fed3ee9812c56a42cf0ad2473c1ab84 | SQL | telagraphic/front-end-tweets | /_site/server/database/database.sql | UTF-8 | 1,315 | 3.3125 | 3 | [] | no_license | create table if not exists tweets (
id serial,
twittertime varchar not null,
created timestamp not null,
handle varchar not null,
message varchar null,
site varchar null,
topic varchar not null,
hashtags varchar,
link varchar not null,
id_string varchar not null unique
);
create table if not exists... | true |
5ea5b00a4551797d1497f449bf2e9cf7f9c2e312 | SQL | iFaxity/dbwebb-oophp | /sql/movie/setup.sql | UTF-8 | 491 | 3.15625 | 3 | [] | no_license | --
-- Setup database for database oophp.
-- By chnc16 for course oophp.
-- 2019-05-08
--
-- Skapa databasen.
-- Om den redan finns så återskapas den
DROP DATABASE IF EXISTS oophp;
CREATE DATABASE oophp;
-- Skapa en användare som vi kan använda
CREATE USER IF NOT EXISTS 'user'@'%'
IDENTIFIED BY 'pass'
;
-- Ge anvä... | true |
32a3fd6f60d97569dcbe016bd4a986872de780bd | SQL | cancaodosol/baratora10 | /WebContent/SQL/mode_ListMonth_itemid.sql | UTF-8 | 758 | 3.90625 | 4 | [] | no_license | SELECT
I.name AS 品目名,
to_char(ship_date,'YYYY年MM月') AS 集計月,
sum(unit_case*num_case) AS 本数,
sum(num_case) AS 箱数,
to_char(sum(sales_amount*num_case), '99,999,999,990') AS 売上(税別),
to_char(sum(sales_amount*num_case)*1.08, '99,999,999,990') AS 売上(税込),
to_char(sum(sales_amount*num_case)/sum(unit_case*num_case),'999,99... | true |
a8de8dbc232ac3a6ad9e7dc93d850f1594125150 | SQL | cchaisson/SQL-Homework_CC | /HomeworkSQL.sql | UTF-8 | 1,798 | 3.9375 | 4 | [] | no_license | SELECT employees.first_name, employees.last_name, employees.gender
FROM employees
INNER JOIN salaries
ON employees.emp_no=salaries.emp_no;
SELECT *
FROM employees
where employees.hire_date > '1986-01-01' and employees.hire_date < '1987-01-01';
SELECT departmentmanager.dept_no,
departments.dept_name,
department... | true |
df0ffbaecba9ade76859519942dfeaa8fe21620d | SQL | bravesoftdz/sgts | /sql/oracle/patch_15.01.2009/procedures/1/112_I_DEFECT_VIEW.prc | WINDOWS-1251 | 450 | 2.796875 | 3 | [] | no_license | /* */
CREATE OR REPLACE PROCEDURE I_DEFECT_VIEW
(
DEFECT_VIEW_ID IN INTEGER,
NAME IN VARCHAR2,
DESCRIPTION IN VARCHAR2,
PRIORITY IN INTEGER
)
AS
BEGIN
INSERT INTO DEFECT_VIEWS (DEFECT_VIEW_ID,NAME,DESCRIPTION,PRIORITY)
VALUES (DEFECT_VIEW_ID,NAME,DESCRIPTION,PRIORITY);
COMMIT;
END;
... | true |
44bafc1f25d899062143ebf1b4f274a91888652c | SQL | mohannadprogrammer/InterieBookingBackend | /reservation.sql | UTF-8 | 4,027 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2019 at 07:59 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0d524d2d204dae5b63dec7872797bd78c0744ff6 | SQL | itsjop/PHP-Final | /sql/attemptLogin.sql | UTF-8 | 196 | 2.828125 | 3 | [] | no_license | /* Select customers where the username and password match those passed as parameters */
select customerid, name, city, address from customers where :username = username and :password = password
| true |
73e0b8fbd07738ca2f827802aef2a8245ea0363a | SQL | colinfoneill/NBA_ETL | /NBA_Schemata.sql | UTF-8 | 1,407 | 2.890625 | 3 | [] | no_license | CREATE TABLE "demographics" (
"player_id" VARCHAR NOT NULL,
"name" VARCHAR NOT NULL,
"height" NUMERIC NOT NULL,
"weight" INT NOT NULL,
"birth_year" INT NOT NULL,
"birth_city" VARCHAR NOT NULL,
"birth_state" VARCHAR NOT NULL,
CONSTRAINT "pk_demographics" PRIMARY KEY ... | true |
8b77c803d9f2d2111e4fb7b780e82385342c9d8b | SQL | nurullaeli07/try | /mitra/gms.sql | UTF-8 | 8,308 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Inang: 127.0.0.1
-- Waktu pembuatan: 06 Jul 2015 pada 21.13
-- Versi Server: 5.5.32
-- Versi PHP: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
a0aaa9cbc790470afbe0ef219acdd94676ff44e6 | SQL | cheikhgwane/mini_projet_jee | /db_esp.sql | UTF-8 | 1,489 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 29 jan. 2020 à 12:13
-- Version du serveur : 5.7.21
-- Version de PHP : 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
1c93e264c6d809e0b4f297c41396bdcc094c1a63 | SQL | flood80/hello | /hello.sql | UTF-8 | 345 | 2.75 | 3 | [] | no_license |
drop table if exists users;
create table users(
id INT NOT NULL auto_increment PRIMARY KEY,
nickname varchar(32) default NULL,
email varchar(64) NOT NULL,
password varchar(64) NOT NULL,
salt varchar(32) NOT NULL,
status bit NOT NULL default 1
);
insert into users(nickname, email, password, salt)
values('test', ... | true |
477a1f5fd2ca35716f8b0ace2d10745aba37691f | SQL | linkhl09/Sistrans-D01 | /data/Crear y poblar tablas/esquemaSuperAndes.sql | ISO-8859-3 | 14,097 | 3.640625 | 4 | [] | no_license | create sequence superAndes_sequence;
--Creacin Tabla CATEGORIA y restriccines
CREATE TABLE CATEGORIA
(
NOMBRE VARCHAR2(100 BYTE),
CONSTRAINT CATEGORIA_PK PRIMARY KEY (NOMBRE)
);
--Creacin Tabla TIPO
CREATE TABLE TIPO
(
NOMBRE VARCHAR2(100 BYTE),
CONSTRAINT TIPO_PK PRIMARY KEY (NOMBRE)
... | true |
3cd1033fa41ed3e7c13701382f4a547aeff27dab | SQL | timmlui/csc343_a2 | /q5.sql | UTF-8 | 576 | 3.9375 | 4 | [] | no_license | SET SEARCH_PATH to parlgov;
--Step 1: Get country data
CREATE VIEW countryData AS
SELECT id AS "country_id", name AS "countryName"
FROM Country;
--Step 2: Calculate the participation rate per country per year
--If more than one election per country per year, average is reported
CREATE VIEW countryParticipationRate A... | true |
33c78bc697e9cd20ab1baa3ee714e69d46009f6f | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.XDDCntryGOID_All.sql | UTF-8 | 332 | 2.734375 | 3 | [] | no_license |
CREATE PROCEDURE XDDCntryGOID_All
@CpnyID varchar( 10 ),
@Acct varchar( 10 ),
@Sub varchar( 24 ),
@ISOCntry varchar( 2 )
AS
Select *
from XDDCntryGOID
where CpnyID LIKE @CpnyID
and Acct like @Acct
and Sub like @Sub
and ISOCntry like @ISOCntry
ORDER by CpnyID, Acct, Sub,... | true |
5c78d3676c9538336832af04a441c71430a84ec0 | SQL | anilktechie/PypeLineETL | /sql/raw_ddl/fact/account_registration_fact.sql | UTF-8 | 2,012 | 3 | 3 | [] | no_license | CREATE TABLE `account_registration_fact` (
`date_fk` int(11) DEFAULT NULL,
`flashnotes_date_fk` int(11) DEFAULT NULL,
`user_fk` int(11) DEFAULT NULL,
`school_fk` int(11) DEFAULT NULL,
`disability_program_fk` int(11) DEFAULT NULL,
`affiliate_fk` int(11) DEFAULT NULL,
`site_fk` int(11) DEFAULT NULL,
`refe... | true |
2a26a28587ed9f843c7b30a5c399b6465d4ee853 | SQL | Armen-e5518/YiiVideoGitLocal | /devmycoachdb_structure.sql | UTF-8 | 5,953 | 3.359375 | 3 | [
"BSD-3-Clause"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : Loacal
Source Server Version : 50552
Source Host : localhost:3306
Source Database : VideoTest
Target Server Type : MYSQL
Target Server Version : 50552
File Encoding : 65001
Date: 2017-03-13 13:03:53
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... | true |
ffcb35137a9210da7e607e2b8dc42daec2d25a9c | SQL | DiegoCampos1/Projects | /Mysql-one-for-all/desafio2.sql | UTF-8 | 283 | 2.765625 | 3 | [] | no_license | CREATE VIEW estatisticas_musicais AS
SELECT
count(cancao_id) AS cancoes,
(
SELECT
count(artista_id)
FROM
SpotifyClone.artistas
) AS artistas,
(
SELECT
count(album_id)
FROM
SpotifyClone.albuns
) AS albuns
FROM
SpotifyClone.cancoes;
| true |
f96e59d062a7c6f58c7feb93ca11d319d42b4526 | SQL | radtek/abs3 | /sql/mmfo/bars/Trigger/tbi_valuables.sql | WINDOWS-1251 | 1,160 | 2.625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Trigger/TBI_VALUABLES.sql =========*** Run *
PROMPT =====================================================================================
PROMPT *** Create trigger T... | true |
30991c5a84b8352716353484b157746d099e425b | SQL | ChelseaCandelora/IndividualProject2 | /IndividualProj/populateDBTables.sql | UTF-8 | 1,414 | 3.296875 | 3 | [] | no_license | INSERT INTO customers (fname, lname, username,email) VALUES ("Dr. P", "Brown", "prbrown", "philippa.brown");
INSERT INTO carts (username) VALUES ("prbrown");
SELECT * FROM customers;
DROP PROCEDURE IF EXISTS insertProducts;
DELIMITER //
CREATE PROCEDURE insertProducts
(IN numProducts INT)
BEGIN
DECLARE x, upc INT... | true |
94f0989e675ccfd9544ec6e7c0eef706d8003b4f | SQL | AlexPerrot/GettingThingsDone | /serverGTD/dbo/Stored Procedures/Users_deletemetadata.sql | UTF-8 | 362 | 2.59375 | 3 | [] | no_license | CREATE PROCEDURE [Users_deletemetadata]
@P_1 Int,
@sync_check_concurrency Int,
@sync_row_timestamp BigInt,
@sync_row_count Int OUTPUT
AS
BEGIN
SET @sync_row_count = 0; DELETE [side] FROM [Users_tracking] [side] WHERE [Id] = @P_1 AND (@sync_check_concurrency = 0 or [local_update_peer_timestamp] = @sync_row_timestam... | true |
b059431c4d9a69954339eeb11f4b63dd98c00165 | SQL | BaraJabali/DBProject | /proj.sql | UTF-8 | 10,845 | 3.734375 | 4 | [] | no_license | create database projecthello;
use projecthello;
show tables;
drop database projecthello;
-- ------------------- begin employee
insert into employee value (1,"bara","2000-12-12","Gypsum","jr",50,Null);
insert into employee value (2,"basel","2000-12-12","Photograph","Photographer",50,Null);
insert into employee value (3,... | true |
18192e481d3e0e6b62f2215d62c976546a9484e6 | SQL | Jayce-Lan/ssm_study | /ssm-news/target/classes/sql/ssmnews.sql | UTF-8 | 2,747 | 4.125 | 4 | [] | no_license | show tables ;
#########
# 角色表 #
#########
create table role(
roleId int primary key comment '角色id',
roleName varchar(20) comment '角色名称'
)comment '角色表';
insert into role
values (1, '管理员'),
(2, '信息员');
select *
from role;
#########
# 用户表 #
#########
create table user(
... | true |
4a98434532228ab0df951db700f0089eff790a20 | SQL | tiberiu-patrascu/Php | /flipquizz/test/flipquiz_DDL_Mike.sql | UTF-8 | 1,510 | 3.703125 | 4 | [
"MIT"
] | permissive | -- DROP DATABASE IF EXISTS flipquiz;
-- CREATE DATABASE IF NOT EXISTS flipquiz CHARACTER SET UTF8 COLLATE utf8_general_ci;
-- USE flipquiz;
DROP TABLE IF EXISTS fp_questions;
DROP TABLE IF EXISTS fp_categories;
DROP TABLE IF EXISTS fp_quizzes;
-- Partie 1 : Quizzes, catégories et questions (!Tedi2020)
CREATE TABL... | true |
f44d69465e99b34f4009a2ae51c39c1b29eada82 | SQL | gabfl/dbschema | /src/unittest/utils/migrations_functional_test/postgresql/2018-12-10/up.sql | UTF-8 | 424 | 2.890625 | 3 | [
"MIT"
] | permissive | CREATE TABLE films (
code char(5) CONSTRAINT firstkey PRIMARY KEY,
title varchar(40) NOT NULL,
did integer NOT NULL,
date_prod date,
kind varchar(10),
len interval hour to minute
);
CREATE TABLE distributors (
did serial PRIMARY key,
name var... | true |
14b6b50834c972d71f758f064bde970490ea6972 | SQL | russelxrussel/SIMS_project | /simsX/query_/display_List_of_Enrolled_co_RONA.sql | UTF-8 | 379 | 3.453125 | 3 | [] | no_license | select B.StudNum, A.LastName, A.FirstName, A.MiddleName, C.LevelTypeDesc, B.Section from Registration.Student_MF B
inner join Registration.Student_Info_MF A
ON B.StudNum = A.StudNum
INNEr join xSystem.LevelType_RF C
ON B.LevelCode = C.LevelTypeCode
where (B.StudTypeCode= 'N' or B.StudTypeCode = 'R') and StatCode = 'EN'... | true |
cf0c4e2d22fa0904beea3a266a9a67945a4d1632 | SQL | 1746671042/shop | /shopping.sql | UTF-8 | 13,497 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50540
Source Host : localhost:3306
Source Database : shopping
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2018-03-25 18:56:05
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
bda69afe8bfb13266f0137555ae9e99a4a91b9be | SQL | vip529/tax_submission_system_php | /tax.sql | UTF-8 | 3,360 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 09, 2019 at 12:01 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
51a2e328c602888975ccd5c1b60dae4395abcde5 | SQL | zlwne/Security5-Demo | /src/main/resources/sql/security5.sql | UTF-8 | 2,117 | 3.171875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 172.16.0.3
Source Server Version : 50726
Source Host : 172.16.0.3:3306
Source Database : gccx_test1
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2019-10-14 14:16:15
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
631522eb6ec8cbda22bfb9da9c4350ab6d1c1f3b | SQL | muharamfachri/Aplikasi-Stok-Obat | /SQL/stokobat.sql | UTF-8 | 5,343 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Bulan Mei 2020 pada 06.08
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
758a59d46763e08473119614d8d0aa089e074dce | SQL | gpolavaram0/sql-challenge | /tables2.sql | UTF-8 | 1,014 | 3.375 | 3 | [] | no_license |
CREATE Table "departments" (
"dept_no" VARCHAR NOT NULL,
"dept_name" VARCHAR NOT NULL,
PRIMARY KEY (dept_no)
);
CREATE Table "dept_emp" (
"emp_no" INT NOT NULL,
"dept_no" VARCHAR NOT NULL,
"from_date" DATE NOT NULL,
"to_date" DATE NOT NULL,
PRIMARY KEY (emp_no, dept_no)
);
CREATE Table "employees" (
"... | true |
1c1677a5f191f618bc70b43e914565bbcaf154d6 | SQL | alpacapetter/algorithm-study-for-personal-growth | /leetcode/medium/rank-scores.sql | UTF-8 | 132 | 3.34375 | 3 | [] | no_license | --https://leetcode.com/problems/rank-scores
SELECT Score as 'score', (DENSE_RANK() OVER(ORDER BY Score DESC)) as 'Rank'
FROM Scores | true |
49cdff826398d5560469d5c22f37f42813ae3b82 | SQL | CUHvZ/cuhvz_website | /scripts/sql/old_tables/weeklongs.sql | UTF-8 | 2,048 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 27, 2019 at 05:01 PM
-- Server version: 10.1.38-MariaDB-cll-lve
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... | true |
276f64546bae81e0a30b0f46bc238187cb333dd7 | SQL | tiggersworth/budgeting_website | /data/init.sql | UTF-8 | 217 | 2.5625 | 3 | [] | no_license | CREATE DATABASE test;
use test;
CREATE TABLE users (
id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(50) NOT NULL,
username VARCHAR(50) NOT NULL,
password VARCHAR(50) NOT NULL,
date TIMESTAMP
);
| true |
49ca2c0282d2bde87a5d69260c83fd6f00d47b15 | SQL | garysenoc/TutorHero | /tutorhero_db.sql | UTF-8 | 1,936 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2021 at 05:33 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
1f7f6be7a59ff0ead91fa9d97db6f0d2f16982f1 | SQL | Edwineverth/practicasC-adoandlinq | /SQLQuery9.sql | UTF-8 | 2,974 | 3.25 | 3 | [] | no_license | insert into Autor values ('Lucas Grey', 'www.google.com','luc_es@gmail.com')
insert into Autor values ('Lucas Grey1', 'www.google.com','luc_es@gmail.com')
insert into Autor values ('Lucas Grey2', 'www.google.com','luc_es@gmail.com')
insert into Autor values ('Lucas Grey3', 'www.google.com','luc_es@gmail.com')
insert i... | true |
bd71d10b2e474491a25b25b464a8c2b58447d7ff | SQL | sasfreitas/mini-twitter | /src/main/resources/db/migration/V1__initialize.sql | UTF-8 | 926 | 3.9375 | 4 | [] | no_license | CREATE TABLE `user` (
`id` BIGINT NOT NULL AUTO_INCREMENT UNIQUE,
`username` VARCHAR(64) NOT NULL,
`email` VARCHAR(256) NOT NULL,
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=INNODB;
CREATE TABLE `follower` (
`user_id` BIGINT NOT NULL,
`follo... | true |
07b000bde19cf1fdaea6c87deb03150957d00c2a | SQL | ireapps/census | /tools/sql/ire_export/ire_PCT7.sql | UTF-8 | 1,630 | 3.0625 | 3 | [
"MIT"
] | permissive | -- PCT7. ASIAN ALONE OR IN COMBINATION WITH ONE OR MORE OTHER RACES, AND WITH ONE OR MORE ASIAN CATEGORIES FOR SELECTED GROUPS
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_pct7 (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
st... | true |
f436d7d71ad792d29e1ada61ca4401ea074de33e | SQL | openforis/fra-platform | /src/server/db/migration/migrations/sqls/20200925081203-content-check-periodic-change-rates-view-up.sql | UTF-8 | 5,494 | 3.59375 | 4 | [] | no_license | DROP VIEW IF EXISTS content_check_periodic_change_rates_view CASCADE;
CREATE VIEW content_check_periodic_change_rates_view AS
SELECT country_iso
, CASE
WHEN row_name = 'forest_area' THEN 'forest_area_annual_net_change'
WHEN row_name = 'other_wooded_land' THEN 'other_wooded_land_annual_net_cha... | true |
c617e6108e69ef4e651eab8f24aa626075c245c6 | SQL | fjg666/qipei_demo | /LKT/db_log/20191205_xky.sql | UTF-8 | 681 | 3.109375 | 3 | [] | no_license | CREATE TABLE `lkt_score_over` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`store_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城id',
`user_id` varchar(15) NOT NULL COMMENT '用户ID',
`old_score` int(11) NOT NULL DEFAULT '0' COMMENT '原积分',
`now_score` int(11) DEFAULT '0' COMMENT '现积分',
`las... | true |
376953dc8daab5cfa95890715041e974d85aa2e1 | SQL | muhajirinlpu/advance-db-pens | /day_07:procedure.sql | UTF-8 | 508 | 3.171875 | 3 | [] | no_license | SET SERVEROUTPUT ON
VARIABLE p_gaji
DECLARE
v_gaji emp.sal%TYPE := &p_gaji;
tampung emp.ename%TYPE;
BEGIN
SELECT ename INTO tampung FROM emp WHERE sal=v_gaji;
DBMS_OUTPUT.PUT_LINE('Gaji tersebut dimiliki oleh pegawai bernama ' ||
tampung);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Ti... | true |
abe1599acf501781b216188f143262cc8c35dcc2 | SQL | JLTecnologia/OraPowerShell | /Ora_PowerShell_env_DB_backup/sql/infoASM.sql | ISO-8859-1 | 2,987 | 3.234375 | 3 | [
"MS-PL"
] | permissive | --==============================================================================
-- Author: Gunther Pipprr ( http://www.pipperr.de )
-- Desc: spool metainfos from the database (backup!)
-- Date: 01.September 2012
-- Site: http://orapowershell.codeplex.com
--========================================================... | true |
2ffa64a246fb2c8120807911fe3183598b9cc4be | SQL | fabric8-services/fabric8-tenant | /migration/sql-files/002-remove-dup-ns.sql | UTF-8 | 249 | 3.59375 | 4 | [
"Apache-2.0"
] | permissive | -- Remove duplicate registered namespaces
-- Keep the oldest one
DELETE FROM namespaces
WHERE id IN (
SELECT id
FROM (
SELECT id, ROW_NUMBER() OVER (partition BY name ORDER BY created_at desc) AS rnum
FROM namespaces
) t
WHERE t.rnum > 1
)
| true |
76372c6204bc86652543194ff38270830918d1af | SQL | muhannadbm/node-db3-project | /queries.sql | UTF-8 | 1,122 | 4.15625 | 4 | [] | no_license | -- Multi-Table Query Practice
-- Display the ProductName and CategoryName for all products in the database. Shows 77 records.
select p.ProductName, c.categoryname from Product as p join category as c on p.categoryid = c.id
-- Display the order Id and shipper CompanyName for all orders placed before August 9 2012. Sho... | true |
b539b85718566bbb6cf92fabfce19ad504e170a2 | SQL | manojramtarento/Phoenix-Zend-Propel | /resources/sql/v2.1.18.sql | UTF-8 | 18,104 | 3.8125 | 4 | [] | no_license | USE phoenix;
SET NAMES 'utf8';
-- *********************** --
-- BLOCK QUERY TYPE CREATE --
-- *********************** --
-- Create new table r_activity_kpi witch contain liste of Activity Kpi
CREATE TABLE `r_activity_kpi`
(`r_activity_kpi_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`r_activity_kpi_libel... | true |
793407d3e859cd723685ec3412e1234c15d7552b | SQL | marcosrib/wellet-spring-boot-java | /src/main/resources/db/migration/postgresql/V1__init.sql | UTF-8 | 592 | 3.296875 | 3 | [] | no_license | create table users(
id serial,
name varchar(50),
password varchar,
email varchar(100),
primary key (id)
);
create table wallet(
id serial,
name varchar(60),
value numeric(10,2),
primary key (id)
);
create table users_wallet(
id serial,
wallet integer,
users integer,
primary key(id),
foreign key(users) r... | true |
76211e1a885adcf60af780c980d853124a9476e2 | SQL | thao97py/friendship_SQL_MySQL | /friendship_answers.sql | UTF-8 | 287 | 3.34375 | 3 | [] | no_license | select * from users;
select users.first_name, users.last_name , users2.first_name as friend_first_name, users2.last_name as friend_last_name
from users
join friendships on users.id = friendships.users_id
join users as users2 on friendships.friend_id= users2.id
order by users2.last_name; | true |
ff74d571607c610f04c5d1bab35540ccbb0d6b00 | SQL | NullPointer299/samplePlay | /docker/mysql/db/sql/001-create-tables.sql | UTF-8 | 545 | 2.828125 | 3 | [] | no_license | DROP TABLE IF EXISTS `language`;
CREATE TABLE IF NOT EXISTS `language`
(
`id` INT(11) AUTO_INCREMENT,
`name` TEXT NOT NULL,
`experience` INT(3) NOT NULL,
PRIMARY KEY(`id`)
);
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user`
(
`id` INT AUTO_I... | true |
acba3370997f270ca5632a96664b18cca5b0d735 | SQL | rochaskingdom/ordem-servico-api | /src/main/resources/db/migration/V002__cria_tabela_ordem_servico.sql | UTF-8 | 479 | 2.984375 | 3 | [] | no_license | CREATE TABLE ORDEM_SERVICO
(
ID NUMBER(11) AUTO_INCREMENT,
CLIENTE_ID NUMBER(11) NOT NULL,
DESCRICAO VARCHAR(255) NOT NULL,
PRECO DECIMAL(10, 2) NOT NULL,
STATUS VARCHAR(20) NOT NULL,
DATA_ABERTURA DATETIME NOT NULL,
DATA_FINA... | true |
b250ba289105b30e6d773144515b433396db09d6 | SQL | vpaplavskij/cv_publisher | /sql/cv.sql | UTF-8 | 5,835 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 20, 2021 at 02:21 AM
-- Server version: 8.0.26-0ubuntu0.20.04.2
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... | true |
6bfa31eacf430e577a90d480a8973db4f78e9202 | SQL | hzchen98/Traductor | /traduccion.sql | UTF-8 | 160 | 2.734375 | 3 | [] | no_license | select e.palabra, i.palabra from Espaniol e
join Traduccion t on t.ca_espaniol = e.c_espaniol
join ingles i on t.ca_ingles = i.c_ingles
where e.palabra = ''; | true |
d54b12260e47897f23018646a5c0d8e2e5be795b | SQL | sebapenna/base-de-datos | /taller-1/create_transporte.sql | UTF-8 | 1,111 | 3.546875 | 4 | [] | no_license | -- script: 'creacion_transporte'
-- resumen: crea dos tablas sobre las paradas y los colectivos por cada parada
-- fecha creacion: 17-04-21
-- ultima modificacion: 24-04-21
-- autor: Sebastian Penna
DROP TABLE IF EXISTS public.colectivos_por_parada;
DROP TABLE IF EXISTS public.paradas;
CREATE TABLE public.paradas (
... | true |
79eb614faaa30a7886302321569a06ca4880e5d1 | SQL | navikt/familie-ef-sak | /src/main/resources/db/migration/V92__oppdater_vilkaarsvurdering_med_barn_id.sql | UTF-8 | 329 | 3.265625 | 3 | [
"MIT"
] | permissive | -- Oppdater barn_id på vilkårsvurderingene - ikke bruk søknad.barn.id
UPDATE vilkarsvurdering
SET barn_id = subquery.id
FROM (SELECT id, behandling_id, soknad_barn_id::TEXT FROM behandling_barn) AS subquery
WHERE vilkarsvurdering.behandling_id = subquery.behandling_id
AND vilkarsvurdering.barn_id = subquery.soknad_ba... | true |
437d6663adae71259ed2f1c083a78764cdaa1d87 | SQL | Cjlenouuu/diplom | /diplom/src/scripts/newSQLTemplate.sql | UTF-8 | 296 | 3.265625 | 3 | [] | no_license | select charityname, firstname, lastname, RoleId
from charity, registration, runner, user
where charity.CharityId = registration.CharityId and
registration.RunnerId = runner.RunnerId and
user.Email = runner.Email and
LastName like 'A%' and FirstName like 'A%' and RoleId like 'R'; | true |
7d4bed19bb4c204e6f24e80b83eb62a499d19691 | SQL | FadeeEka/Store | /spring-onlineStore-service-carts/src/main/resources/db/mysql/schema.sql | UTF-8 | 288 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE IF NOT EXISTS onlinestore;
GRANT ALL PRIVILEGES ON onlinestore.* TO os@localhost IDENTIFIED BY 'os';
USE onlinestore;
CREATE TABLE IF NOT EXISTS cart(
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
user_id INT(4) UNSIGNED NOT NULL
) engine=InnoDB;
| true |
b76595ed11cb074475e79588c404763c63098a03 | SQL | Vtorgimenes/psicosystem | /PsicoSystemBDA (1).sql | UTF-8 | 2,275 | 3.421875 | 3 | [] | no_license | CREATE TABLE pessoa (
nome varchar(60),
cpf varchar(60),
telefone varchar(11),
endereco varchar(60),
email varchar(60)
);
INSERT INTO Pessoa (nome, cpf, telefone,endereco,email) VALUES
('Michelle', '00000000000', 99999999,'rua jose alves cavalheiro','802.098@unigran.br');
CREATE TABLE Login (
id_login INT,
em... | true |
8ebec065afd38bcc781609ea8318c00e5a9757f4 | SQL | nvduran/employee-tracker | /schema.sql | UTF-8 | 407 | 3.125 | 3 | [] | no_license | DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE departments (
dept_name VARCHAR(30)
);
CREATE TABLE roles (
title VARCHAR(30) NOT NULL,
salary DECIMAL NOT NULL,
dept_id INTEGER NOT NULL
);
CREATE TABLE employees (
first_name VARCHAR(30) NOT NULL,
las... | true |
3d204ff11d7f7330af0d7d3fd5bcfc4a7aab8071 | SQL | vladimirlojanica/a12n-server | /mysql-schema/032-privilege-settings.sql | UTF-8 | 334 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | SET NAMES utf8mb4;
START TRANSACTION;
INSERT INTO changelog VALUES (32, UNIX_TIMESTAMP());
CREATE TABLE privileges (
privilege VARCHAR(200) NOT NULL PRIMARY KEY,
description VARCHAR(2000) NOT NULL
);
INSERT INTO privileges (privilege, description) VALUES ('admin', 'Full admin privileges on the authenciation serv... | true |
cb93b1e7befbf238dad319712c3c423f189d9a74 | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_acc_insertaccounts.sql | UTF-8 | 1,658 | 2.71875 | 3 | [] | no_license | CREATE procedure sp_acc_insertaccounts(@accountname nvarchar(255),@groupid integer,
@openingbalance decimal(18,6),@additionalfield1 decimal(18,6) =0,@additionalfield2 decimal(18,6) =0,
@additionalfield3 decimal(18,6) =0,@additionalfield4 datetime =NULL,@additionalfield5 datetime =NULL,
@additionalfield6 nvarchar(30)=N'... | true |
a7ee802d667a1a2907636ca8e4883bcc7ff40dfd | SQL | askor2005/blagosfera | /Blagosfera/data-jpa/src/main/resources/mybatis_migrations/oldscripts/2016/02/20160203162622_add_news_attachments_table.sql | UTF-8 | 605 | 3.296875 | 3 | [] | no_license | -- // add_news_attachments_table
-- Migration SQL that makes the change goes here.
CREATE TABLE news_attachments
(
id bigint NOT NULL,
src character varying(255) NOT NULL,
type character varying(255) NOT NULL,
news_id bigint NOT NULL,
height integer,
width integer,
CONSTRAINT news_attachments_pkey PRIMAR... | true |
3831fda7df849dae4e650aba3d5cf0137c0b6706 | SQL | johnhwatts/Database_Exercises | /functions_exercises.sql | UTF-8 | 1,163 | 4.4375 | 4 | [] | no_license | USE employees_db;
-- Use count(*) and GROUP BY to find the number of employees for each gender with those names
SELECT COUNT(*) AS "Number of emplyees with these first names", gender
FROM employees
WHERE gender IN ('M', 'F')
AND first_name IN ('Irena','Vidya', 'Maya')
GROUP BY gender;
-- Use concat() to combine their... | true |
6a91fa2b9c19fa93fbd98f53a41cc453dd3e63c8 | SQL | KevinRolandoGonzalezRamirez/Prototipo2P | /Base de datos.sql | UTF-8 | 3,154 | 3.578125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 28-09-2021 a las 22:14:55
-- Versión del servidor: 8.0.26
-- Versión de PHP: 7.4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... | true |
48f329c9e4d8c3f0332e9739f260c902fbfb3cba | SQL | MarioSalamanca64/master-php | /aprendiendo-sql/09-ejercicios/ejercicio06.sql | UTF-8 | 239 | 2.78125 | 3 | [] | no_license | /*
6.Visualizar el nombre y los apellidos en una misma columna
y su fecha de registro y el dia de la semana en la que se registraron
*/
SELECT CONCAT(nombre,' ',apellidos) AS 'nombre y apellidos',
fecha, DAYNAME(fecha)from vendedores;
| true |
8c6ec8c7111a481c82bf841fe6ce0932604f287c | SQL | wuruowuxin/ssm02 | /sql/sql.sql | UTF-8 | 2,856 | 3.703125 | 4 | [] | no_license | /*
SQLyog Community v12.3.3 (64 bit)
MySQL - 5.1.47-community : Database - realestatel
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FO... | true |
5f0a2a9ff1fa29b2c0eb1dc6281d3cbf38c7194b | SQL | sevenzing/fse_database_task | /schema.sql | UTF-8 | 6,930 | 3.859375 | 4 | [] | no_license | CREATE TABLE staff (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
is_superuser BOOLEAN DEFAULT false,
is_ta BOOLEAN DEFAULT false,
is_prof BOOLEAN DEFAULT false,
is_doe BOOLEAN DEFAULT false
);
CREATE TABLE subject (
id ... | true |
e9b4411429792c1da9bbad907e56173074791651 | SQL | pedroi77/resergol1.1 | /dataBase/SPs/SP_insertTorneosImagenes.sql | UTF-8 | 586 | 3.1875 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS SP_insertTorneosImagenes;
DELIMITER //
CREATE PROCEDURE SP_insertTorneosImagenes
(
pIdTorneo INT ,
pUrl VARCHAR(150),
OUT vResultado INT
)
BEGIN
DECLARE Error INT DEFAULT 0;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET Error = -1;
... | true |
82e50599892008dd1b1b332fd5c5801b0978375e | SQL | ham11max/testapp | /Create tables.sql | UTF-8 | 343 | 2.96875 | 3 | [] | no_license | CREATE TABLE cities
(
id serial NOT NULL,
countryname character varying(80),
cityname character varying(80),
CONSTRAINT cities_pkey PRIMARY KEY (id)
);
CREATE TABLE countries
(
id serial NOT NULL,
countryname character varying(80) NOT NULL,
countryisocode character varying(3),
CONSTRAINT countries_pke... | true |
3edf810bf514aa2e79a46b74f19f084c264d8769 | SQL | adinbied/Ardu808Experiment | /DBTableSetup.sql | UTF-8 | 922 | 2.515625 | 3 | [] | no_license | 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 */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET N... | true |
4e1c67a7df7906062d74c99c5bf2c67ba822e7c1 | SQL | vishwashbhardwaj/Task | /test.sql | UTF-8 | 4,789 | 2.828125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.50, for Win32 (x86)
--
-- Host: localhost Database: lib
-- ------------------------------------------------------
-- Server version 5.5.50
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... | true |
d9f0d593cf45ed955cc52f8d60fe024ade99dda2 | SQL | iamzcr/nicholasNote | /python/chelseaNews/football_news.sql | UTF-8 | 1,799 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2016 年 03 月 23 日 09:27
-- 服务器版本: 5.5.16
-- PHP 版本: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_... | true |
e5dcfff67408af9ab501db4d362b63bb1fc25353 | SQL | jmurciego/deusto2016 | /AppEventos/src/main/resources/database/hsqldb-schema.sql | UTF-8 | 197 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE EVENTOS(
ID_EVENTO VARCHAR(10) NOT NULL,
NOMBRE_EVENTO VARCHAR(100),
DESCRIPCION_EVENTO VARCHAR(500),
TIPO VARCHAR(100),
FECHA TIMESTAMP,
PRIMARY KEY (ID_EVENTO));
| true |
fb4fb355c1e3a1bb93f0f0b16f336d1c1c693865 | SQL | Elliotelon/acorn2021_project | /Insta_Project/src/main/webapp/WEB-INF/table.sql | UTF-8 | 3,243 | 3.640625 | 4 | [] | no_license | --mk_users 테이블(가입,로그인)
CREATE TABLE mk_users(
id VARCHAR2(100) PRIMARY KEY, --아이디
pwd VARCHAR2(100), --비밀번호
email VARCHAR2(100), --이메일
profile VARCHAR2(200), --프로필
regdate DATE, --날짜
);
--mk_users 테이블 시퀀스
CREATE SEQUENCE mk_users_seq;
--mk_notice 테이블(공지사항)
CREATE TABLE mk_notice(
num NUMBER PRIMARY KEY, --글번호
... | true |
e3a07b8d1d020d20f767061a3e1f1bbaa930435e | SQL | aidanr67/wazimap-za | /sql/electricityforcooking_electricityforheating_electr.sql | UTF-8 | 3,473,412 | 2.828125 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
ALTER TABLE IF EXISTS ONLY public.electricityforcooking_el... | true |
f7e695c51526b1b4ccaf0189bbf0d084ed40cda4 | SQL | SkillsFundingAgency/tl-matching | /Ad-Hoc SQL/Remove Duplicate Provider Qualifications.sql | UTF-8 | 631 | 3.109375 | 3 | [
"MIT"
] | permissive | SELECT
Id,
ProviderVenueId,
QualificationId,
RowNumber
FROM
(
SELECT
Id,
ProviderVenueId,
QualificationId,
ROW_NUMBER() OVER (PARTITION BY ProviderVenueId, QualificationId ORDER BY ProviderVenueId, QualificationId) RowNumber
FROM ProviderQualification
) AS... | true |
c525e683172561616f278e5f486ca6cf46a3096e | SQL | Maple-Lazuli/USAF-SDI-Project1 | /account_manager/db/src/init.sql | UTF-8 | 6,657 | 3.5 | 4 | [] | no_license |
CREATE TABLE public.knex_migrations (
id integer NOT NULL,
name character varying(255),
batch integer,
migration_time timestamp with time zone
);
ALTER TABLE public.knex_migrations OWNER TO accountmanager;
--
-- Name: knex_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: accountmanager
--
... | true |
30f152c9b26bd7684340347935e0e5b8cf176719 | SQL | georgek/virus-analysis | /alternative.sql | UTF-8 | 1,012 | 3.21875 | 3 | [] | no_license | create temp table alternative as
select position,
case nuc
when 'A' then case max(sum(C),sum(G),sum(T))
when sum(C) then 'C'
when sum(G) then 'G'
when sum(T) then 'T'
end
when 'C' then case max(sum(A),sum(G),sum(T))
... | true |
43a7af7664652cffad3f5dbc5275730604507c76 | SQL | yefc/CBOE | /subprojects/Database/CoeDB/Oracle_Install_Scripts/sql/Patches/Patch 17.1.0/Packages/Manage_Users.sql | UTF-8 | 4,360 | 3.59375 | 4 | [] | no_license | create or replace
PACKAGE BODY Manage_Users
AS
PROCEDURE getUsers (
pPrivTableName IN privilege_tables.privilege_table_name%TYPE,
o_rs OUT cursor_type
)
AS
BEGIN
OPEN o_rs FOR
SELECT DISTINCT grantee AS username, first_name AS firstname, last_name AS... | true |
f8c213d5f48c2a24d0cb9b2eeb8dd456855b5ba5 | SQL | rchibana/CurrencyFairMessageProcessor | /src/main/resources/db/migration/V1__Create_transaction_table.sql | UTF-8 | 396 | 2.640625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `TRANSACTION` (
`id` BIGINT PRIMARY KEY AUTO_INCREMENT,
`user_id` BIGINT NOT NULL,
`amount_buy` DECIMAL(19,2) NOT NULL,
`amount_sell` DECIMAL(19,2) NOT NULL,
`currency_from` VARCHAR(3) NOT NULL,
`currency_to` VARCHAR(3) NOT NULL,
`originating_country` VARCHAR(2) NO... | true |
607fa153568834a3e871888bacf302f7a68c49b6 | SQL | valenvb/cisc332 | /omts.sql | UTF-8 | 11,398 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 25, 2018 at 08:10 PM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
cf95bc17fc595da539875cc33ac396401a48d97d | SQL | suflair01/algoritmos | /banco de dados/luminosidade_endereço.sql | UTF-8 | 343 | 2.578125 | 3 | [] | no_license | create database luminosidade;
use luminosidade;
create table endereco(
Id_cep int primary key auto_increment,
uf varchar(2),
municipio varchar(50),
bairro varchar(40),
logradouro varchar (40),
numero int
) auto_increment = 100;
insert into endereco values
(null, "sp", "são paulo", "mooca", "rua cuiaba", "340")
se... | true |
e92ee8abdb5316ae62c3e5748a02e71379ba08da | SQL | odebr/crud_adm | /database/sqls/add_qb_token_created_at.sql | UTF-8 | 424 | 2.671875 | 3 | [] | no_license | ALTER TABLE `btrulead_leads`.`users`
ADD COLUMN `qb_token_created_at` TIMESTAMP NULL AFTER `qb_client_secret`,
ADD COLUMN `qb_refresh_token_used` TINYINT NULL AFTER `qb_token_created_at`;
ALTER TABLE `btrulead_leads`.`users`
CHANGE COLUMN `qb_token_created_at` `qb_access_token_expire_at` TIMESTAMP NULL DEFAULT NU... | true |
c79a61e56e5158509044c049ae66bd2e4e22fe2f | SQL | ezesubu/Shopping_Car_CS490 | /src/main/resources/schema.sql | UTF-8 | 8,142 | 3.046875 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.26-0ubuntu0.18.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 10.1.0.5464
-- --------------------------------------------------------
... | true |
832c3fe5ad8265a7a80f28bce5d94855a4ed2cbf | SQL | JakeSichley/Discord-Bot | /migrations/003-guild-features.sql | UTF-8 | 275 | 2.609375 | 3 | [
"MIT"
] | permissive | -- Revises: 002
-- Creation Date: 2023-07-14 02:42:09 UTC
-- Reason: Add Guild Features
CREATE TABLE IF NOT EXISTS "GUILD_FEATURES" (
"GUILD_ID" INTEGER NOT NULL,
"FEATURES" INTEGER NOT NULL,
PRIMARY KEY("GUILD_ID")
);
PRAGMA user_version = 3; | true |
48f5baa1dc23eb3636aaa610018c8da89eea0b5e | SQL | sunilthetab/unienroll | /export.sql | UTF-8 | 27,074 | 2.796875 | 3 | [] | no_license | --------------------------------------------------------
-- File created - Sunday-March-26-2017
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table APPUSER
--------------------------------------------------------
CREATE TABLE "RMUDDU... | true |
c9f09a206655030cbc57965068e82f2793f224cc | SQL | DidiMilikina/DataCamp | /Data Analyst with Python - Career Track/05. Joining Data in SQL/02. Outer joins and cross joins/09. Outer challenge.sql | UTF-8 | 750 | 4.375 | 4 | [] | no_license | /*
Outer challenge
Now that you're fully equipped to use outer joins, try a challenge problem to test your knowledge!
In terms of life expectancy for 2010, determine the names of the lowest five countries and their regions.
Instructions
100 XP
Select country name AS country, region, and life expectancy AS life_exp.
M... | true |
1f7311c58772558992a0c60d39f2f3de83b652c3 | SQL | yujihamaguchi/sql-QA | /p112_01.sql | UTF-8 | 705 | 4.125 | 4 | [] | no_license | -- Q: Accountsより処理3回単位の累計、つまり移動累計を求めよ。
-- A
/*
SELECT
prc_date
,prc_amt
,(SELECT
SUM(prc_amt)
FROM
Accounts r2
WHERE
r1.prc_date >= r2.prc_date
AND (SELECT
COUNT(*)
FROM
Accounts r3
WHERE
r3.prc_date BETWEEN r2.prc_date AND r1.prc_date) <= 3
HAV... | true |
53a740c886d34a71985e9621ca9aa55845ba8f10 | SQL | WillZWL/shop | /admincentre/dbv/data/schema/so_extend.sql | UTF-8 | 1,801 | 2.71875 | 3 | [] | no_license | CREATE TABLE `so_extend` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`so_no` char(8) NOT NULL,
`order_reason` int(11) NOT NULL DEFAULT '0',
`notes` varchar(255) NOT NULL DEFAULT '',
`offline_fee` double(15,2) DEFAULT '0.00',
`vatexempt` tinyint(1) unsigned DEFAULT '0',
`acked` char(1) NOT NULL DEFAULT '',
`... | true |
31c9eac4be9c6b50dab9f767d8648cc949587f97 | SQL | WFP-Dubai/ETS-Compas | /scripts/EPIC_GEO.sql | UTF-8 | 403 | 3.015625 | 3 | [] | no_license | prompt
prompt Creating view EPIC_GEO
prompt ======================
create or replace view epic_geo as
select org_units.code as org_code,
org_units.name,
org_units.geo_point_code,
geo_points.name as geo_name,
country_code,
reporting_code,
organization_id,
org_units.compas... | true |
d26ce3fd19d58830c62f2d748661f09d5d877b91 | SQL | MaximoGui/MySql | /Atv1RelacionalDataBase.sql | UTF-8 | 2,941 | 3.3125 | 3 | [] | no_license | create database db_RH2;
use db_RH2;
create table tb_cargos(
id bigint auto_increment,
cargo varchar(30) not null,
posicao varchar(30) not null,
funcao varchar(200),
primary key(id)
);
create table tb_funcionarios(
id bigint auto_increment,
nome varchar(40) not null,
idade int(10),
salari... | true |
3be77964afb362ed03140e94f2f53051e050360d | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_acc_rpt_salesregistersummary.sql | UTF-8 | 2,497 | 3.859375 | 4 | [] | no_license |
CREATE procedure sp_acc_rpt_salesregistersummary(@fromdate datetime,@todate datetime)
as
create table #salesregistersummary(InvoiceDate nvarchar(20) ,GoodsValueSales decimal(18,6),
GoodsValueSalesReturnDamages decimal(18,6),GoodsValueSalesReturnSaleable decimal(18,6),
TotalTaxSuffered decimal(18,6),TotalDiscount dec... | true |
6b0dc7387d581242007da0235cff21402c534262 | SQL | McLeodMoores/starling | /projects/master-db/src/main/resources/db/migrate/postgres/sec/V_57__migrate_sec.sql | UTF-8 | 559 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | START TRANSACTION;
-- update the version
UPDATE sec_schema_version SET version_value='57' WHERE version_key='schema_patch';
ALTER TABLE sec_equity ADD COLUMN preferred boolean;
UPDATE sec_equity SET preferred = 'false';
UPDATE sec_equity SET preferred = 'true' WHERE security_id IN (
SELECT security_i... | true |
4c30c2e3c416058b873ccf2f303603a0ace607e0 | SQL | hophacker/CS2 | /cloud.sql | UTF-8 | 2,443 | 3.46875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50525
Source Host : localhost:3306
Source Database : cloud
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2012-07-19 05:26:05
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
ada5b0f955555c1518fd0f879349bacf17d34896 | SQL | aartikansal/SQL.BuildAndDestroy | /answers/exercise10.sql | UTF-8 | 232 | 2.59375 | 3 | [] | no_license | use myNewDB;
SELECT * FROM Students;
INSERT INTO Students( StudentName, Address, City, PostalCode, Country)
VALUES ('Han','57 Unoin St','Trenton','G13RB','USA' );
SELECT * FROM Students WHERE City= 'Trenton' or CITY='Philadelphia';
| true |
9ffa8480226c6184f31572e09176823e8e630174 | SQL | jafarbakhshaliyev/SQL | /WorldPopulationsChallengePart2.sql | UTF-8 | 1,396 | 4.1875 | 4 | [] | no_license | -- World Populations Challenge Part II from CodeAcademy:
-- 1) How many entries in the countries table are from Africa?
Select count(*) from countries where continent = 'Africa';
-- 2) What was the total population of the continent of Oceania in 2005?
Select SUM(population) as total from countries c join populatio... | true |
c160cbe35409cd00ecbd0d311a0ad29ff86bca48 | SQL | willy-progr/pharmacy_website | /medicineguide.sql | UTF-8 | 8,911 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 14, 2017 at 04:19 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.