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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
09db9dfa117f70adc9f472baa426e3c4a79eb6a8 | SQL | arpitnarechania/sqlqueries | /facebook_presto.sql | UTF-8 | 143,137 | 3.09375 | 3 | [] | no_license | SELECT release_version FROM system.local
SELECT status_replicated FROM %s.system.built_views WHERE view_name = '%s'
CREATE TABLE IF NOT EXISTS bar (c TIMESTAMP, LIKE like_table EXCLUDING PROPERTIES)
select * from foo a (x, y, z)
SELECT orderdate, orderkey, custkey FROM orders", "SELECT count(*) FROM orders");
SELECT * ... | true |
7b13830470d7b7a916b46418cb48efe99a690cd1 | SQL | Egor993/Book-Shop-PHP | /phpshop.sql | UTF-8 | 16,296 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Фев 24 2021 г., 16:09
-- Версия сервера: 10.3.22-MariaDB
-- Версия PHP: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
5a746c320682296b3afadd5732f7fc7f59b73cf6 | SQL | Rammslise/MCD | /exercice2/queries.sql | UTF-8 | 1,287 | 4.21875 | 4 | [] | no_license | --Exercice 1
--Il faudra pouvoir afficher les lignes du registre
--(titre, nom et prénom du client, date d'emprunt et de retour du livre).
SELECT `books`.`title`,
`clients`.`lastname`,
`clients`.`firstname`,
`registers`.`borrowingDate`,
`registers`.`returnDate`
FROM `registers`
INNER JOIN `clients`
ON `clients`.`id` ... | true |
305c3510ae2ef6db3117e51c39ce294966078b35 | SQL | JFMACS/practice_sql | /1264 - Page Recommendations.sql | UTF-8 | 333 | 3.484375 | 3 | [] | no_license | select
distinct page_id recommended_page
from
Likes
where
user_id in
(
select user1_id user_id
from Friendship
where user2_id = 1
union
select user2_id user_id
from Friendship
where user1_id = 1
)
and page_id not in (select page_id
from Likes
where... | true |
f540edd270d392b5417b95741bd34bc17b5ce2f9 | SQL | harrifeng/mysql-cookbook-code | /summary/sum_expt.sql | UTF-8 | 609 | 3.828125 | 4 | [] | no_license | # sum_expt.sql
# expt table summary queries
# number of records, and non-NULL scores
SELECT COUNT(*), COUNT(score) FROM expt;
# number of NULL scores
SELECT COUNT(*) - COUNT(score) FROM expt;
# number of records per subject
SELECT subject, COUNT(*) FROM expt GROUP BY subject;
# number of records per test
SELECT test,... | true |
249b0402466a36ba6e5adb49d19925cbaf7b4ca0 | SQL | dazcode/Hackerrank.com-code-challenges | /src/accepted_solutions/jsonoutput/weatherobservationstation13_9348.sql | UTF-8 | 394 | 2.96875 | 3 | [] | no_license | /*****************************
Code by: David Zentner dazcode@gmail.com
http://www.dazcode.com/
this code is an accepted solution for code challenge located at:
https://www.hackerrank.com/challenges/weather-observation-station-13
this code may need to run in the hackerrank online ide to work correctly
*****************... | true |
c4097bfca156dda022b275944fc7dd3c978865ab | SQL | anurak220329/njproject | /nj_system.sql | UTF-8 | 1,833 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2020 at 03:26 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
6fad50a5ee07627e37b2da96ac0f63e30a2af50c | SQL | Rubenamontanez/database-exercises | /functions_exercises.sql | UTF-8 | 779 | 4.1875 | 4 | [] | no_license | use employees;
SELECT CONCAT(first_name,' ', last_name) AS 'Full Name'
FROM employees
WHERE last_name LIKE 'E%'
ORDER BY last_name ASC
;
SELECT * FROM employees
WHERE (hire_date
BETWEEN '1990-01-01' AND '1999-12-31')
AND birth_date LIKE '%12-25'
ORDER BY birth_date ASC, hire_date DESC
;
SELECT DATEDIFF(CURRENT... | true |
3ace5cd38c03564d090beb6d9f6fe4616904668f | SQL | EdgeCaseBerg/col-con-lost-n-found | /sql/events.sql | UTF-8 | 190 | 2.75 | 3 | [] | no_license | CREATE TABLE events (
id INT(20) NOT NULL auto_increment PRIMARY KEY, -- association id for foreign relationships to other tables
name CHAR(64) UNIQUE,
enabled TINYINT(1)
) ENGINE InnoDB; | true |
2f5a4d177caeedc005c5f4da0b4efb108a74887b | SQL | tekaha/movielens | /sql/06.get-genre-count-per-movie.sql | UTF-8 | 173 | 2.984375 | 3 | [] | no_license | select
movieid
, title
, occurrences_regexpr('[|]' in genres) + 1 as genre_count
, genres
from "aa.movielens.db.hdb::data.movies"
order by genre_count asc;
| true |
9a9f4dd3abb16a38986f7eae575a81c020710a6b | SQL | DaniellKondoff/Databases----MS-SQL-Server | /10.ExamPreparation 12.OCT.2016/Section 3 Querying - P09. Average Loans.sql | UTF-8 | 281 | 3.546875 | 4 | [] | no_license | Select top 5 cu.CustomerID,lo.Amount from Customers as cu
JOIN Loans as lo
ON cu.CustomerID=lo.CustomerID
Where lo.Amount >(
Select AVG(l.Amount) from Customers as cu
JOIN Loans as l
ON cu.CustomerID=l.CustomerID
Where cu.Gender='M')
Order BY cu.LastName ASC
| true |
013f778673fecd31e42ad494613b21275122b8ce | SQL | postgresql-async/postgresql-async | /build/prepare_mysql.sql | UTF-8 | 639 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE mysql_async_tests;
USE mysql_async_tests;
CREATE TABLE mysql_async_tests.transaction_test (id VARCHAR(255) NOT NULL, PRIMARY KEY (id));
CREATE USER 'mysql_async'@'127.0.0.1' IDENTIFIED BY 'root';
CREATE USER 'mysql_async_sha256'@'127.0.0.1' IDENTIFIED WITH sha256_password; ;
SET old_passwords = 2;
SET P... | true |
f8601557ab24e6cfb4bad937716e04679336e6ce | SQL | INiiS/Epitech | /webSeminar/web_seminar_day11_2018/ex_09/ex_09.sql | UTF-8 | 142 | 3.203125 | 3 | [] | no_license | USE coding;
SELECT MIN(min_duration) AS 'Duration of the shortest movie'
FROM movies
WHERE min_duration IS NOT NULL
AND min_duration > 0;
| true |
daa5d1f0d4e869745a4a7a2c85a0ab9db70c26b9 | SQL | lecafard/pprojcomp | /backend/sql/20200830-init.sql | UTF-8 | 503 | 3.296875 | 3 | [] | no_license | -- initial schema, might just use SQLAlchemy
CREATE TABLE meeting (
id SERIAL PRIMARY KEY,
owner_key VARCHAR(32) NOT NULL UNIQUE,
guest_key VARCHAR(32) NOT NULL UNIQUE,
name VARCHAR(64) NOT NULL,
location VARCHAR(64) NOT NULL,
description TEXT,
options JSON NOT NULL
);
CREATE TABLE entr... | true |
672cffacc7e01ef04c496389b65c85ea1d2a7664 | SQL | sunFengYin/seckill | /sql/seckill.sql | UTF-8 | 4,669 | 3.296875 | 3 | [] | no_license |
/*!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 */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SE... | true |
f986686c9a2879e5b020360e91eb376f0052d190 | SQL | fanalis93/Classroom-Schedule-Maker | /SQL Files/plsql_function2.sql | UTF-8 | 2,039 | 3.765625 | 4 | [] | no_license | SET SERVEROUTPUT ON
SET VERIFY OFF
CREATE OR REPLACE FUNCTION insertschedule(persontype students.stud_email%TYPE,personID schedule.class_id%TYPE,
classid schedule.class_id%TYPE,
classCondition schedule.class_condition%TYPE,
starttime schedule.start_time%TYPE,
endtime schedule.end_time%TYPE)
RETURN VARCHAR2
IS... | true |
f9201d20891c40749ac907ad46f7d1a00877d973 | SQL | cesargp45/Bases1_Proyecto1 | /proyecto1/[BD1]Consultas.sql | UTF-8 | 8,785 | 4.4375 | 4 | [] | no_license |
-- Reporte 1
SELECT PERSONA.nombre,PERSONA.telefono ,TRANSACCION.id ,TRANSACCION.precio_total
FROM TRANSACCION,PERSONA
WHERE precio_total = (SELECT MAX(precio_total) FROM TRANSACCION) AND
TRANSACCION.persona = PERSONA.id AND
PERSONA.tipo = (SELECT id FROM TIPO WHERE TIPO.nombre = 'P')
ORDER BY id
--Reporte 2
SELEC... | true |
7835673970054fa68ce393ddb4a8ae5c67f6d5d9 | SQL | jonorsky/Fullcalendar_CLEAN | /DATABASE/calendar.sql | UTF-8 | 942 | 3.421875 | 3 | [] | no_license |
-- Dumping database structure for calendar
CREATE DATABASE IF NOT EXISTS `calendar` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `calendar`;
-- Dumping structure for table calendar.events
CREATE TABLE IF NOT EXISTS `events` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text... | true |
e59dc0aee03b0a5a4f41f9ba28c9448279e49da7 | SQL | hskundhal/CovidSQLDataAnlalytics | /Solution.sql | UTF-8 | 4,412 | 4.34375 | 4 | [] | no_license | -- Assumption:
-- If user does not have positive date for covid then he is asummed to have never contracted covid and filtered from possible covid contraction dates
-- -- --------------------------------------------------------------------
-- Events with Covid person
-- ------------------------------------------------... | true |
5191efe28b5933f9253f157c7ae06c14a1b3be1d | SQL | katfree/ChinookSQL | /Chinook_Queries/line_item_track_artist.sql | UTF-8 | 327 | 3.53125 | 4 | [] | no_license | --Provide a query that includes the purchased track name AND artist name with each invoice line item.
SELECT i.InvoiceLineId, i.TrackId, i.UnitPrice, t.Name, ab.ArtistId, art.Name
From InvoiceLine i
JOIN Track t ON i.TrackId = t.TrackId
JOIN Album ab ON t.AlbumId = ab.AlbumId
JOIN Artist art ON ab.ArtistId = art.Ar... | true |
d9f48592d502309543408a04c375c2f0801e416f | SQL | carsystem-ti/RegistroSafra | /Frame.ServiceLayer/Consulta/Oportunidade/ConsultaTitular.sql | UTF-8 | 216 | 2.96875 | 3 | [] | no_license | WITH tableTemp as (
SELECT
T0."empID"
,T0."lastName" || ', '|| T0."firstName"
FROM
"{0}".OHEM T0
WHERE
T0."Active" = 'Y'
)
SELECT
*
,(SELECT COUNT(1) FROM tableTemp T0) AS "COUNT"
FROM
tableTemp T0 | true |
e6cf1cd6f01cd95e348aec9342b8165400256443 | SQL | randaman23/e-commerce-sim | /db/schema.sql | UTF-8 | 224 | 3.09375 | 3 | [] | no_license | drop table if exists products,cart;
create table products(
product_id serial primary key,
name text,
price int,
img_url text
)
create table cart(
cart_id serial primary key,
product_id int references products(product_id)
) | true |
a66ec1614f58c4fbff8ce4a30540904263b0c49c | SQL | AnastasiaShreder/DataBases_coursework | /sql/scripts_lab_2.sql | WINDOWS-1251 | 517 | 3.03125 | 3 | [] | no_license | --
--
--1. ,
-- .
SELECT * FROM GOODS ORDER BY name;
SELECT * FROM GOODS ORDER BY priority DESC;
--2. .
SELECT good_count FROM sales WHERE (create_date = '15.02.2020') | true |
b9d6e799530831c0ed53c6076bbd53bd05dd5a70 | SQL | Sarjuuk/aowow | /setup/updates/1591223185_01.sql | UTF-8 | 439 | 2.796875 | 3 | [] | no_license | DROP TABLE IF EXISTS `aowow_achievementcategory`;
CREATE TABLE `aowow_achievementcategory` (
`id` smallint(5) unsigned NOT NULL DEFAULT '0',
`parentCat` smallint(5) unsigned NOT NULL DEFAULT '0',
`parentCat2` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARS... | true |
67a00cad018cc4cd640edc8fa25e9cb27a649677 | SQL | MrArtemAA/MyStocks | /modules/core/db/init/hsql/20.create-db.sql | UTF-8 | 607 | 3.5625 | 4 | [] | no_license | -- begin STOCKS_CURRENCY
create unique index IDX_STOCKS_CURRENCY_UNIQ_CODE on STOCKS_CURRENCY (CODE) ^
-- end STOCKS_CURRENCY
-- begin STOCKS_OPERATION
alter table STOCKS_OPERATION add constraint FK_STOCKS_OPERATION_STOCK foreign key (STOCK_ID) references STOCKS_STOCK(ID)^
-- end STOCKS_OPERATION
-- begin STOCKS_STOCK
... | true |
2f64983e3159d5de56cec4b2208d4bacf2cf821c | SQL | apex-kosova/Life-Insurance | /VIEWS/V_70_PYMT_TRAN_DTL.sql | UTF-8 | 929 | 3.046875 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for View V_70_PYMT_TRAN_DTL
--------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "V_70_PYMT_TRAN_DTL" ("R_K", "CUS_ACC_R_K", "CUS_R_K", "DRCR", "TRAN_TP", "APR_STA", "BUS_DT", "CRT_BY", "CRT_DT", "UPD_BY", "... | true |
67c105c5d592b38d70ebaedc0e6e58ff93907709 | SQL | huyvn/software-engineering | /app/sql/CREATE_TABLES.sql | UTF-8 | 2,748 | 3.859375 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS bios_db;
USE bios_db;
CREATE TABLE STUDENT (
`userID` VARCHAR(100) NOT NULL,
`password` VARCHAR(100) NOT NULL,
`name` VARCHAR(100) NOT NULL,
`school` VARCHAR(100) NOT NULL,
`edollar` DECIMAL (10,2) NOT NULL,
PRIMARY KEY (`userID`)
);
CREATE TABLE ADMIN (
`adminID` VARCHAR(100) NOT ... | true |
815c4d3c16254ce45fda62a549fa3bce33745e7d | SQL | kpstankova/Data-Bases-project | /createTables.sql | UTF-8 | 2,789 | 3.90625 | 4 | [] | no_license | SET SCHEMA FN71839;
CREATE TABLE CLIENTS(
TELEPHONE_NUMBER VARCHAR(13) NOT NULL CONSTRAINT PK_CLIENT_TEL PRIMARY KEY,
CLIENT_NAME VARCHAR(50),
PAYMENT CHAR(7) CHECK (PAYMENT IN('BY CARD', 'IN CASH')),
BRANCH_NAME VARCHAR(20)
);
CREATE TABLE ORDERS(
ORDER_NUMBER INT NOT NULL GENERATED ALWAYS AS I... | true |
cf5095341e94ff5f688c1268f5e1fdb1459ee6e7 | SQL | Francisco-LT/trybe-exercices | /bloco20/dia2/exercicio_extra_dia2.sql | UTF-8 | 884 | 3.15625 | 3 | [] | no_license | CREATE database IF NOT EXISTS faculdade;
USE faculdade;
CREATE TABLE IF NOT EXISTS biblioteca (
`nome` VARCHAR(40) CHARACTER SET utf8,
`emprestado` VARCHAR(3) CHARACTER SET utf8,
`quantidade` INT,
`ano_lancamento` INT,
`vendas` INT
);
INSERT INTO faculdade.biblioteca VALUES
('Um Livro do Ano','N... | true |
c380c9c5b5e3c264c6a084cd4bbc602b17f99da4 | SQL | sarheed/Tripadvisor-AR | /dbtest.sql | UTF-8 | 556 | 3.109375 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
-- Database: `dbtest`
-- Table structure for table `users`
CREATE TABLE IF NOT EXISTS `users` (
`user_id` int(5) NOT NULL AUTO_INCREMENT,
`user_name` varchar(25) NOT NULL,
`user_email` varchar(35) NOT NULL,
PRIMARY KEY (`user_id`),
... | true |
9eb4c6d464e141eb433a17fd7bea0143c2230f28 | SQL | hoodlake/ymxx-sync | /Enterprise/Bytter/Sql_Script/VP5839_ORCL.sql | GB18030 | 971 | 3 | 3 | [] | no_license |
--ָָԴֶ
-- Add/modify columns
alter table BIS_EXC add VOUCHER_FROM number(2,0);
-- Add comments to the columns
comment on column BIS_EXC.VOUCHER_FROM
is '1²
2ͷ
3ϻ
4
5Ը
6Թֹ̨';
-- Add/modify columns
--Ӵ״ֶ̬
alter table NIS_BILLHEAD add REFUSE_STATUS number;
--ָ״ֶ̬
alter table NIS_BILLHEAD add VOUCHER_STAT char(1)... | true |
07335d263202d7c265e9d2b1fb2dc49b74d27ddc | SQL | parallaxinc/Cloud-Session | /database/cloudsession-schema.sql | UTF-8 | 4,839 | 3.25 | 3 | [
"MIT"
] | permissive | /*
* Base Cloud Session database schema.
*/
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64)
--
-- Host: localhost Database: cloudsession
-- ------------------------------------------------------
-- Server version 5.7.7-rc-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... | true |
d3d9b5cc1a3876d2e815f1b178d46cb68037d786 | SQL | bayubagusbagaswara/training-mysql | /c2-where-operator/c21-cari-data.sql | UTF-8 | 379 | 2.96875 | 3 | [] | no_license | -- mencari data menggunakan operator perbandingan
select id,
nama,
harga,
jumlah
from products
where jumlah > 100;
-- menampilkan semua data dari table products dimana nilai kolom jumlah lebih dari samadengan 100
select *
from products
where jumlah >= 100;
-- menampilkan data dimana kategorinya yang bukan ... | true |
18c90c8a957b4e0503e6914426d9a4d39db70b8c | SQL | Amer-Saleh/Bamazon | /BamazonSeeds.sql | UTF-8 | 1,839 | 2.984375 | 3 | [] | no_license | CREATE DATABASE Bamazon;
USE Bamazon;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(450) NOT NULL,
department_name VARCHAR(45),
price DECIMAL(10,2) NULL,
stock_quantity INT DEFAULT 0,
PRIMARY KEY (item_id)
);
INSERT INTO products (product_name, department_name, price, ... | true |
78fda666af6378d712855626e3d37476289ef9e8 | SQL | ViniciusAmbrosi/crescer-2016-1 | /src/modulo-07-banco-parte2/TAREFA-4.sql | UTF-8 | 366 | 3.671875 | 4 | [
"MIT"
] | permissive | SELECT UF, QTD_APOSTAS, VALOR_ARRECADADO
FROM (SELECT cid.UF UF,
TO_CHAR(COUNT(1), '999G999G999') QTD_APOSTAS,
TO_CHAR(SUM(VALOR), '999G999G999D99') VALOR_ARRECADADO
FROM APOSTA apo
LEFT JOIN CIDADE cid ON apo.IDCIDADE = cid.IDCIDADE
WHERE apo.IDCONCURSO = 1824
GROUP BY cid.UF
... | true |
1c6285c2b693072b8f0b74f7201f93992d858cc8 | SQL | marto96/PARKINGDOM | /parkingdom (1).sql | UTF-8 | 7,446 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 14-11-2018 a las 23:32:36
-- Versión del servidor: 5.5.24-log
-- Versión de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
7c324ad5647362c15ce20bc7e329b9d60b4df3d0 | SQL | BandoCoder/bap-server-bradfordbossen | /migrations/002.do.create_patterns.sql | UTF-8 | 244 | 2.953125 | 3 | [] | no_license | -- Mind the foreign key reference
CREATE TABLE patterns (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
title TEXT NOT NULL,
pattern_data JSON NOT NULL,
user_id INTEGER
REFERENCES users(id) ON DELETE CASCADE NOT NULL
); | true |
1df30c78c033e155dec700682a5ca4ec789a0abb | SQL | JSON033/CSE-111 | /Jason-Feng-lab5/15.sql | UTF-8 | 744 | 3.59375 | 4 | [] | no_license | SELECT SUM(l_extendedprice * (1 - l_discount)) / (SELECT SUM(l_extendedprice * (1 - l_discount))
from nation n1 , nation n2, region, customer, supplier, lineitem, orders
where c_nationkey = n1.n_nationkey and c_custkey = o_custkey and n1.n_regionkey = r_regionkey and r_name = 'EUROPE' and l_orderkey = o_orderkey
and ... | true |
6a703d2d0e90bfb01b9478fb097d92ed284d1a9b | SQL | canasikk/library-management-system | /library.sql | UTF-8 | 3,836 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 26 Haz 2021, 16:32:44
-- Sunucu sürümü: 10.4.18-MariaDB
-- PHP Sürümü: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
08f5ebfa238769ae663742f8ea8e20c345b51ea9 | SQL | appNG/appng | /appng-core/src/main/resources/db/migration/mysql/V2_4__migrate_to_platform.sql | UTF-8 | 4,312 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | -- update properties
update property set name=replace(name,'application.','platform.');
update property set name=replace(name,'.plugin.','.application.');
update property set name=replace(name,'.defaultPlugin','.defaultApplication'),value = 'appng-manager' where name like '%.defaultPlugin%';
update property set name=re... | true |
c90e9cb461499e2e5fe09ee80769e3b110efe6d9 | SQL | e-muf/Proyecto-Ventas-Auto-BDD | /scripts/s-06-autos-rfp-s1-trigger-sucursal.sql | UTF-8 | 3,495 | 3.71875 | 4 | [
"MIT"
] | permissive | --@Author: Rodrigo Francisco Pablo
--@Fecha de creacion: 21/01/2021
--@Descripcion: Instead of trigger empleado para implementar
-- DML en la sucursal para rfp-s1 (insert, delete)
create or replace trigger t_dml_sucursal
instead of insert or update or delete on sucursal
dec... | true |
8140c3735463123dd0ecc02bdd56eb4bdcc8af99 | SQL | kimberly-erin/sakila_mysql | /Sakila script.sql | UTF-8 | 6,261 | 4.3125 | 4 | [] | no_license | USE sakila;
-- 1a
SELECT first_name,last_name FROM actor;
-- 1b
SELECT CONCAT(first_name," ",last_name) AS "Actor Name" FROM actor;
-- 2a
SELECT actor_id,first_name,last_name FROM actor WHERE first_name="Joe";
-- 2b
SELECT actor_id,first_name,last_name FROM actor WHERE last_name like "%GEN%";
-- 2c
SELECT actor_id... | true |
6c1085020a297c27a691e1e79e56bd39d78f41b6 | SQL | albertinizao/codechallenge | /src/test/resources/bbdd/schema.ddl | UTF-8 | 1,207 | 3.578125 | 4 | [
"Apache-2.0"
] | permissive | SET MODE Oracle;
CREATE TABLE APLICACIONES (
ID_APLICACION NUMBER(4,0) NOT NULL PRIMARY KEY,
NOMBRE_APLICACION VARCHAR2(100) NOT NULL
);
CREATE TABLE USUARIOS (
ID_USUARIO VARCHAR2(250),
PASS_USER VARCHAR2(250),
NOMBRE_APELLIDOS VARCHAR2(500),
CONSTRAINT PK_USUARIOS PRIMARY KEY (ID_USUARIO)
);
CREATE TABLE GR... | true |
096dca0f46d33d134d2fc6a12c6960c4872551f7 | SQL | lsantander86/calculadora_cp | /bd_calculadora.sql | UTF-8 | 3,202 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 19-01-2021 a las 15:08:48
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
df5a81cd15b716e83a1338126776148fc3fa1704 | SQL | giserh/POIScrawler | /poiscrawler/doc/table_info.sql | UTF-8 | 1,320 | 3.515625 | 4 | [
"MIT"
] | permissive |
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `proxies`;
CREATE TABLE `proxies` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`proxy` varchar(25) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`ts` int(11) DEFAULT NULL,
`counter` int(10) DEFAULT NULL,
`web` varchar(255) DEFAULT... | true |
cf302d65d193e6f41130ebc0013bf1077c288805 | SQL | anteknik/admin-starter | /db/security/user_logins_202102121243.sql | UTF-8 | 3,235 | 3.359375 | 3 | [] | no_license | -- Drop table
-- DROP TABLE public.user_logins
CREATE TABLE public.user_logins (
id bigserial NOT NULL,
email varchar(255) NULL,
"password" varchar(255) NOT NULL,
username varchar(255) NOT NULL,
account_non_expired int4 NOT NULL DEFAULT 1,
account_non_locked int4 NOT NULL DEFAULT 1,
credentials_non_expired in... | true |
c2ad4d92c836c220e3ccf86c4f79f5bd71832dc4 | SQL | lord/clockwork | /db_structure.sql | UTF-8 | 3,098 | 3.4375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 2.11.11.3
-- http://www.phpmyadmin.net
--
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
--
-- Table structure for table `errortable`
--
CREATE TABLE `errortable` (
`errorid` int(11) NOT NULL auto_increment,
`errortext` text NO... | true |
e2bb963adee08e7632d7f7352178dbd7d2a10fcc | SQL | QTAnt/MySQL- | /新建插入替换.sql | GB18030 | 684 | 3.359375 | 3 | [] | no_license | 1.½һѧ
create table students(
id int unsigned primary key auto_increment comment '',
sn int not null unique key comment 'ѧ',
name varchar(20) not null comment '',
qq varchar(20) comment 'qq'
);
2.
insert students values(1,10000,'','123456789');
insert students (id,sn,name,qq) values (2,10001,'˽',null);
insert students (... | true |
e325adfa40236ebd455e3c4843aa1ea9d5d3edfa | SQL | manucouto1/BBDD_Logistica | /Consultas_Logistica_BBDD_V2.sql | UTF-8 | 17,605 | 3.953125 | 4 | [] | no_license | SET SCHEMA 'logistica';
-- Punto 1
-- 1 Mostra a listaxe completa de compras realizadas ata o momento por todas as
-- administracións: identificador e nome da administración, data da compra, identificador e
-- nome do provedor.
SELECT p.cod, p.n_com, p.f_comp, p.id_prov, pr.nom FROM pedido p
JOIN provedor pr ON p... | true |
53917b9f3b593ed69a0d668a695e15a6aee41fd4 | SQL | yucheng780/DataBase | /SQL/SELECT/E-3.49.sql | UTF-8 | 285 | 2.890625 | 3 | [] | no_license |
--等值连接
SELECT Student.*, SC.*
FROM Student, SC
WHERE Student.Sno = SC.Sno;
--自然连接
SELECT Student.Sno,Sname,Ssex,Sage,Sdept,Cno,Grade
FROM Student,SC
WHERE Student.Sno = SC.Sno;
--等值连接
SELECT *
FROM Student, SC
WHERE Student.Sno = SC.Sno;
| true |
3cdc5f1ec4e5f58d3e6f9063e2e17854666eb00e | SQL | dcp12345678/postgres-testing | /ddl/ddl.sql | UTF-8 | 682 | 3.65625 | 4 | [] | no_license | DROP TABLE IF EXISTS person;
DROP TABLE IF EXISTS dept;
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE IF NOT EXISTS dept (
--id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
id SERIAL NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
UNIQUE (name)
);
CREATE TABLE IF NOT EXISTS person (
--id UUI... | true |
18fcad1494e8bf9846bcc075728f0d2821954664 | SQL | nathalianpa/projeto-integrador | /Pet_Feliz_TADS/bd/petfeliz.sql | UTF-8 | 3,109 | 3.640625 | 4 | [] | no_license | CREATE DATABASE PETFELIZ;
CREATE TABLE PETFELIZ.PRODUTO (
ID BIGINT NOT NULL AUTO_INCREMENT,
NOME VARCHAR(100) NOT NULL,
MARCA VARCHAR(100) NOT NULL,
DESCRICAO VARCHAR(1000) NULL,
PRECO_COMPRA DECIMAL(9,2) NOT NULL,
PRECO_VENDA DECIMAL(9,2) NOT NULL,
QUANTIDADE I... | true |
4d58e814ccf09058e6df62b03a346822d0fe8a11 | SQL | akzholio/pgexercises | /Basic/union.sql | UTF-8 | 215 | 2.765625 | 3 | [] | no_license | -- You, for some reason, want a combined list of all surnames and all facility names.
-- Yes, this is a contrived example :-). Produce that list!
SELECT surname FROM cd.members
UNION
SELECT name FROM cd.facilities;
| true |
c883aa08faedc991584e9abba0f77479a45bf4d2 | SQL | griff4692/active-record-lite | /cats.sql | UTF-8 | 1,218 | 3.609375 | 4 | [] | no_license | CREATE TABLE cats (
id INTEGER PRIMARY KEY,
name VARCHAR(255) NOT NULL,
owner_id INTEGER,
FOREIGN KEY(owner_id) REFERENCES human(id)
);
CREATE TABLE humans (
id INTEGER PRIMARY KEY,
fname VARCHAR(255) NOT NULL,
lname VARCHAR(255) NOT NULL,
house_id INTEGER,
FOREIGN KEY(house_id) REFERENCES house(id... | true |
2c5c4f714fd2f4e076e913460e430428af481b84 | SQL | 132101020/- | /购买次数.sql | UTF-8 | 675 | 3.96875 | 4 | [] | no_license | #创建视图,统计用户购买次数
create view purchasetimes as
select user_id, count(type) as times
from jdata_action
where type = 'pay'
group by user_id
select max(times) from purchasetimes
#统计购买次数对应的人数
select times,count(times) as '人数'
from purchasetimes
group by times
order by times
#统计每日消费总次数
select date,sum(times) as '日消费总次数'
fr... | true |
923e5d1f1e6edbc83ecf2dc2ae2045ecf933a3e2 | SQL | xeonye/ilearn | /file/tb_manager_script/服务申请基本属性表脚本.sql | UTF-8 | 3,719 | 3.03125 | 3 | [] | no_license | CREATE TABLE tb_manager_sm_basic_arr(
ID NUMBER PRIMARY KEY,
set_id NUMBER, --վID
ug_id NUMBER, --��֯ID
tbc_id NUMBER, --��ѵ��ID
ser_id NUMBER, --����ID
CONTENT VARCHAR2(4000),--��������
file_name VARCHAR2(1000),--������
file_site VARCHAR2(4000),--������ַ
... | true |
df323248063c14bdf758422baa9487259865de99 | SQL | dickanirwansyah/tutor-spring | /command-pattern/src/main/resources/sql/skema.sql | UTF-8 | 869 | 3.78125 | 4 | [] | no_license | /** schema database **/
create table pengguna(
email varchar(255) not null unique,
firstname varchar(255) not null,
lastname varchar(255) not null,
aktiv varchar(255) not null,
created_at date not null,
updated_at date not null,
constraint pk_pengguna_email primary key (email)
);
create ta... | true |
9b6ed6a2a317fd05e0742c0e8cec97c6d5e21944 | SQL | wangyunwu5/mhics2019 | /src/main/resources/templates/sql/person.sql | UTF-8 | 2,332 | 3.03125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : w_mysql
Source Server Version : 50725
Source Host : localhost:3306
Source Database : mhics
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2019-06-22 18:28:48
*/
SET FOREIGN_KEY_CHEC... | true |
f194d578fbc2572a0031f6535c14e1dd0730ecb2 | SQL | arahaduelist/PengaduanPHP | /sql/data_progweb.sql | UTF-8 | 1,689 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2018 at 07:03 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
e3ec1ca397ceb9cc56b9cacd1d5f156db35c1f88 | SQL | hikingit/pern | /model/schema/users.sql | UTF-8 | 287 | 3.125 | 3 | [] | no_license | DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
org_id int NOT NULL,
username VARCHAR(255) UNIQUE,
password VARCHAR(255),
first_name VARCHAR(255),
last_name VARCHAR(255),
email VARCHAR(255) UNIQUE,
FOREIGN KEY (org_id) REFERENCES orgs(org_id)
);
| true |
bd6080c0d50710d053bba727ccaaeb1f70895166 | SQL | JorgeAliste/ProyectoFisFinder120 | /fisfinder120.sql | UTF-8 | 3,950 | 3.125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-11-2016 a las 02:39:35
-- Versión del servidor: 5.7.9
-- Versión de PHP: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... | true |
894e13d679d3d1fa47c212bef39e1e50a3cbce5d | SQL | arkuzmin/rsoi | /bd/scripts/disp/DELTA_SCRIPTS/01_createSchemaObjects.sql | UTF-8 | 3,499 | 3.640625 | 4 | [] | no_license | CREATE SCHEMA rsoi_disp DEFAULT CHARACTER SET utf8 ;
create table rsoi_disp.taxiparks (
taxipark_guid varchar(200) not null,
taxipark_queue varchar(100) not null,
primary key(taxipark_guid)
);
insert into rsoi_disp.taxiparks (taxipark_guid, taxipark_queue) values ('947a24f8-ead8-4820-984a-108b241bdbbc', 'TAX... | true |
c1ae80877e8d78b136fec41255d94c9803490605 | SQL | praveenweb/template-gallery | /postgres/getting-started/migration.sql | UTF-8 | 4,086 | 3.296875 | 3 | [] | no_license | -- To uninstall demonstration:
-- Delete the `_helloworld` schema from the expanded page on the left
-- or you may run: `DROP SCHEMA IF EXISTS _helloworld` from the SQL tab to the left
--
-- Please be careful before running, as all data in the schema will be removed
-- Create Schema
CREATE SCHEMA _helloworld;
-- Crea... | true |
83349469f22d54e81e6fb3028af3f1a32cebceec | SQL | AnastasPetrenski/Data-Base | /MS SQL/01 Database introduction/Task 1 - 6.sql | UTF-8 | 966 | 3.890625 | 4 | [] | no_license | CREATE DATABASE Minions
USE Minions
CREATE TABLE Minions(
Id INT PRIMARY KEY NOT NULL,
[Name] NVARCHAR(50) NOT NULL,
Age TINYINT
)
-- Error:
--String or binary data would be truncated in table 'Minions.dbo.Minions', column 'Name'. Truncated value: 'S'.
ALTER TABLE Minions
ALTER COLUMN [Name] NVARCHAR(50)
CREATE T... | true |
216701782e3aab6b358a8dcc3d0daa70fdb05899 | SQL | souiwamura/php_project | /app/sql/total.sql | SHIFT_JIS | 745 | 4.03125 | 4 | [] | no_license | yƁz`{̂
select
count(created_at) as day_count,
date_format(created_at, '%Y%N%m%%d%') as date
from
posts
where
date(created_at) = date(now())
group by date(created_at)
order by created_at;
yTƁz`݂獡܂߂OV(tׂ\)
select
count(created_at) as week_count,
from
posts
where
date(created_at)
between
(curdate() - interval 1... | true |
7b4793d213f38077218527c6d8f5f973bf9925f5 | SQL | tayduivn/training | /rdbms/update/.svn/text-base/sacwis_1190.sql.svn-base | UTF-8 | 1,467 | 2.953125 | 3 | [] | no_license | --STGAP00017857 - Release(5.1) Modify the Caseloadlisting rpt to run statewide
--Add optional Region Parameter and modify the sequence of the County, Unit,staff ID
---parameters.
-- Modify SHINES report Launch page description
--ClearQuest #: STGAP00017818
--ASR #: ASR11139
-- DBCR STGAP00017857
update caps.reports s... | true |
6b284c2c688aab2430e07a1a95c0ad6b767efdbf | SQL | logogin/CoursesWorks | /Databases/Triggers/trigger_total.sql | UTF-8 | 1,091 | 3.78125 | 4 | [] | no_license | set serverout on;
drop table empl;
drop table empsalary;
drop table depart;
create table empl(id number(4),name varchar2(15),deptno number(3));
create table empsalary(id_emp number(4),salary number(7,2));
create table depart (deptno number(3),dname varchar2(10),totalemp number(6));
DROP TRIGGER OutTrigger;
CREA... | true |
dd302f89f6107333d9d7ed3804ce8d3a999b5b9f | SQL | ljx0920/dataCenter | /Fusion-Server/src/main/resources/bin/fusion_stage.sql | UTF-8 | 8,703 | 2.71875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 10.10.1.74_3307
Source Server Version : 50630
Source Host : 10.10.1.74:3307
Source Database : fusion_stage
Target Server Type : MYSQL
Target Server Version : 50630
File Encoding : 65001
Date: 2019-04-09 18:11:58
*/
SET FOREIGN_KEY_CHE... | true |
22c22505fe25a4d93400e30cfb8d0b340106fa3a | SQL | tgspacelabs/Dev | /master/master/Server Objects/PageLocks.sql | UTF-8 | 1,181 | 2.5625 | 3 | [] | no_license | CREATE EVENT SESSION [PageLocks] ON SERVER
ADD EVENT [sqlserver].[lock_acquired]
(
SET collect_database_name = 1,
collect_resource_description = 1
ACTION ([sqlserver].[database_id],
[sqlserver].[database_name],
[sqlserver].[query_hash],
[sqlserver].[query_plan_h... | true |
038de86fb2572540a663d10b237c4332750dbcf6 | SQL | mazw-git/LCN-4.1- | /数据库脚本/bbg_inventory.sql | UTF-8 | 695 | 2.734375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50621
Source Host : localhost:3306
Source Database : bbg_inventory
Target Server Type : MYSQL
Target Server Version : 50621
File Encoding : 65001
Date: 2019-07-24 16:53:58
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
58632f4237509ee150b89debdabc77553d3d23bd | SQL | WraithBorg/Trial | /src/main/resources/db/schema-h2.sql | UTF-8 | 201 | 2.625 | 3 | [] | no_license | DROP TABLE IF EXISTS tr_exam;
CREATE TABLE tr_exam
(
id BIGINT(20) NOT NULL AUTO_INCREMENT,
question VARCHAR(255) NULL DEFAULT '' ,
answer VARCHAR(255) NULL DEFAULT '' ,
PRIMARY KEY (id)
);
| true |
b562cc23d0c5dc8956c29d012b3d8e249144f462 | SQL | c0ns0le/docker-introscope | /database/9.6.0.0/scripts/createsequences-postgres-5.0.0.sql | UTF-8 | 27,237 | 2.90625 | 3 | [
"MIT"
] | permissive | -- This file creates the sequences required for the
-- Primary Key generation of the tables
CREATE SEQUENCE ts_app_auth_types_ts_id_seq;
ALTER SEQUENCE ts_app_auth_types_ts_id_seq OWNED BY ts_app_auth_types.ts_id;
ALTER TABLE ts_app_auth_types ALTER COLUMN ts_id SET DEFAULT nextval('ts_app_auth_types_ts_id_seq');
C... | true |
b96a5ecf3ae9cb97189a4de480abfcf1f3af5cad | SQL | montshejohn/Assignments | /storage-system/storage_system.sql | UTF-8 | 3,453 | 3.96875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS Business (
id serial PRIMARY KEY,
business_name VARCHAR(25)NOT NULL,
contact_number VARCHAR(20)NOT NULL,
contact_name VARCHAR(15)NOT NULL,
contact_email VARCHAR(35)NOT NULL
updtated_at
);CREATE TABLE IF NOT EXISTS Customers (
id serial PRIMARY KEY,
customer_n... | true |
10e68c66fed7831512b35778a5c3c16b8a661e67 | SQL | pborne/i2b2_1.6.09_Netezza | /edu.harvard.i2b2.data/Release_1-6/NewInstall/Crcdata/scripts/crc_create_datamart_netezza.sql | UTF-8 | 8,032 | 3.515625 | 4 | [] | no_license | --*********************************************************
-- ORACLE SCRIPT TO CREATE DATA TABLES
-- SNM - 8/19/2008
--**********************************************************
-----------------------------------------------------------------------------------------
-- create ENCOUNTER_MAPPING tabl... | true |
527a30ad38dc206dd8e09f5d06eb1137ce635ebb | SQL | akshaykumar7612/BiddingSystem | /src/main/resources/data.sql | UTF-8 | 1,761 | 3.734375 | 4 | [] | no_license | DROP TABLE IF EXISTS tb_auction_item cascade;
CREATE TABLE tb_auction_item (
n_item_code bigint(32) AUTO_INCREMENT PRIMARY KEY,
d_min_base_price DOUBLE NOT NULL,
d_step_rate DOUBLE NOT NULL,
d_highest_bid_price DOUBLE NULL,
s_status VARCHAR(250) DEFAULT 'RUNNING',
n_version bigint(32) NOT NULL DEFAULT 0,
... | true |
fb2ecb4ff1bf2685ef91b617e748ff6b51e045c1 | SQL | AlexanderTeryaev/Sports-app | /sports-app/Database Scripts/tennis_ranks_4_9.sql | UTF-8 | 280 | 3.171875 | 3 | [] | no_license |
ALTER TABLE dbo.Seasons
ADD PreviousSeasonId int NULL,
FOREIGN KEY(PreviousSeasonId) REFERENCES dbo.Seasons(Id);
ALTER TABLE dbo.TennisRank ADD
AveragePoints int NULL,
PointsToAverage int NULL,
SeasonId int NULL,
FOREIGN KEY(SeasonId) REFERENCES dbo.Seasons(Id); | true |
99d0bfccf97becf6ab47e16a59771242b1d1283f | SQL | DDavidson202020/Employee_Tracker | /schema.sql | UTF-8 | 2,280 | 3.890625 | 4 | [] | no_license | DROP DATABASE IF EXISTS employees_db;
CREATE DATABASE employees_db;
USE employees_db;
CREATE TABLE department (
department_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
);
CREATE TABLE role (
role_id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(30),
salary DECIMAL(4,2),
department_id IN... | true |
cf930f57c8cf1a3720484e8fa6050eeae803e33a | SQL | Arpit3011/Secure-Banking-Project | /MTBCDatabase.sql | UTF-8 | 11,011 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.24, for osx10.8 (x86_64)
--
-- Host: 127.0.0.1 Database: mtbc
-- ------------------------------------------------------
-- Server version 5.6.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... | true |
b42a9e64ca1dcfad033a0de48cc83d09b4a00fb8 | SQL | DaleSeo/spring-practice | /src/test/resources/sql/examples.sql | UTF-8 | 325 | 3.015625 | 3 | [] | no_license | CREATE TABLE examples (
id INTEGER NOT NULL,
name CHAR(25),
description VARCHAR(25) NOT NULL,
date DATE,
PRIMARY KEY (id));
INSERT INTO examples VALUES(1, 'Dale', 'Dale is cute.', sysdate);
INSERT INTO examples VALUES(2, 'Kate', 'Kate is pretty.', sysdate);
INSERT INTO examples VALUES(3, 'Yeji', 'Yeji is busy.', sysda... | true |
eba8d42aa84421ca61e6c06b7eee6581fa57251a | SQL | spring440/Database32 | /Schema/Tables/CreateTables.sql | UTF-8 | 4,186 | 3.5625 | 4 | [] | no_license |
ALTER PROCEDURE createTables
AS
BEGIN
DROP TABLE PresenterPresentationMapping;
DROP TABLE PresentationTrackMapping;
DROP TABLE EventScheduleMapping;
DROP TABLE PresentationDifficultyMapping;
DROP TABLE Schedule;
DROP TABLE PersonRolesMapping;
DROP TABLE Sponsor;
DRO... | true |
1ab61d75f9ed9c0f42a3d5b691b46af1b426e210 | SQL | pdk/genquery | /create-sample-table.sql | UTF-8 | 440 | 2.671875 | 3 | [] | no_license | create table if not exists sample_table (
id bigserial not null primary key,
name varchar(100),
is_good boolean,
birth_date date,
first_encounter timestamp without time zone,
dollars numeric(10,2)
);
insert into sample_table (... | true |
3504afa94b822a3a6a6e4fd8620acebe74a117c1 | SQL | mcscunha/SQL_Sistema_MV | /MV/DeletarNotaFiscal_Faturamento.sql | UTF-8 | 695 | 3.28125 | 3 | [] | no_license | -- Este é o numero da NF passada pelo usuario
select a.sn_rps_gerada, a.* from DBAMV.nota_fiscal a
where nr_id_nota_fiscal in (420);
--
-- CUIDADO: Nao sao os mesmos codigos usados no SELECT acima
-- Deve-se descobrir estes numeros com o SELECT acima
select * from NOTA_FISCAL_TRIBUTO where cd_nota_fiscal in ... | true |
2c21d4b18dcf3b3ad42e3c5f4ef5960f5f789f9b | SQL | ReinaldoDiasAbreu/Estacionamento | /src/main/resources/scriptBD.sql | UTF-8 | 1,310 | 3.5 | 4 | [] | no_license | CREATE TABLE ESTACIONAMENTO(
id INT NOT NULL AUTO_INCREMENT,
nome VARCHAR(100) NOT NULL,
endereco VARCHAR(100),
telefone VARCHAR(11),
precohora DECIMAL(5,2),
quantvagas INT,
CONSTRAINT PK_Estacionamento PRIMARY KEY (id, nome)
);
CREATE TABLE CLIENTE(
id INT NOT NULL AUTO_INCREMENT,
... | true |
c1b4c7e5edb346f9a8dd84644ff06bfcd243fe79 | SQL | kanhaiya150/Oracle-Guru | /audit-set-noaudit.sql | UTF-8 | 672 | 2.859375 | 3 | [] | no_license | --
-- check where we are working
--
select NAME, LOG_MODE, OPEN_MODE, CREATED, RESETLOGS_TIME, PRIOR_RESETLOGS_TIME, CONTROLFILE_CREATED, OPEN_RESETLOGS from v$database;
--
-- state of tablespace before any action
--
select TABLESPACE_NAME, BYTES/1024/1024 as freeMB from dba_free_space where tablespace_name='SYSTEM';
-... | true |
d10151d9eb4ae68dd683738e781f6d250c4ff1d9 | SQL | PhysTony/asd9823j9das_MFBI_and_DA | /Section_9_SQL_SELECT_statement/Other Comparison Operators.sql | UTF-8 | 805 | 3.453125 | 3 | [] | no_license | /* También se cuenta con operadores matemáticos:
= equal to
> greater than
>= greater than or equal to
< less than
<= less than or equal to
<> not equal , different from
!= not equal , different from
*/
/* Filtremos los nombres de los empleados que sean
igual a Mark.
*/
SELECT
*
FROM
employees
W... | true |
5d4797080b36b6c33e0736ecc0d5631805686aea | SQL | dasomel/egovframework | /common-component/v3.6.2/src/script/mysql/ddl/dam.map_create_mysql.sql | UTF-8 | 3,563 | 3.0625 | 3 | [] | no_license | CREATE TABLE COMTECOPSEQ
(
TABLE_NAME VARCHAR(20) NULL,
NEXT_ID NUMERIC(30) NULL,
PRIMARY KEY (TABLE_NAME)
)
;
CREATE UNIQUE INDEX COMTECOPSEQ_PK ON COMTECOPSEQ
(
TABLE_NAME
)
;
CREATE TABLE COMTNDAMMAPTEAM
(
ORGNZT_ID CHAR(20) NOT NULL,
ORGNZT_NM ... | true |
cf2c473b6321178bdd3999c82935988bd8e5e2de | SQL | zmatth/QueroSerDev | /MATHEUS_COSTA_AVALIACAO_BD/matheus_costa_cartorio_prova.sql | UTF-8 | 4,216 | 3.578125 | 4 | [] | no_license | /*
* Contratos, a de Endereços e a de Clientes. Crie também os dicionários necessários.
* (11)95197-9317
*/
create table cliente(
cd_cliente bigint not null auto_increment,
nm_cliente varchar(50) not null,
cpf_cliente varchar (15),
cnpj_cliente varchar (20),
tel_cliente varchar (15) not n... | true |
6cb965649afaee71b9133c571338087a1ea5bcf2 | SQL | ven2day/ECommerce-2 | /back/src/main/resources/213.sql | UTF-8 | 2,204 | 3.921875 | 4 | [] | no_license | CREATE TABLE users (
id int unsigned NOT NULL ,
email varchar(45) NOT NULL,
password varchar(45) NOT NULL,
merchant_type varchar(45) NOT NULL,
merchant_name varchar(45) NOT NULL,
owner_name varchar(45) NOT NULL,
address varchar(45) NOT NULL,
phone varchar(45) NOT NULL,
UNIQUE KEY username_UNIQUE (emai... | true |
201949710c523cf27daf06ec167b975960c436c5 | SQL | RaphaelTo/Controle-SQL | /seeding.sql | UTF-8 | 1,388 | 3.140625 | 3 | [] | no_license | INSERT INTO `year` (idyear, label) values (1, "First year (BSC) "),
(2,"Second year (Bsc Hons) "),
(3, "Third year (Msc) ");
INSERT INTO student (idstudent, firstname, lastname) values (1,"Olivier","Martin"),
(2,"Pierre","Martin"),
(3,"Jacques","Martin"),
(4,"Martin","François"),
(5,"Jennifer","Garner");
INSERT INTO ... | true |
f3c2e1fed39623970b1da515f012e6ec2be9c44f | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.ADG_UpdtShip_GetZeroScheds.sql | UTF-8 | 391 | 2.609375 | 3 | [] | no_license | create proc ADG_UpdtShip_GetZeroScheds
@CpnyID varchar(10),
@OrdNbr varchar(15),
@TodaysDate smalldatetime
as
select LineRef,
SchedRef,
QtyOrd
from SOSched
where CpnyID = @CpnyID
and OrdNbr = @OrdNbr
and Status <> 'C'
and (QtyOrd = 0 or CancelDate <= @TodaysDate and @TodaysDate <> '')
-- Copyri... | true |
e63092bd252219f331ee1bce82311583db914c20 | SQL | AlexBoeira/MigradorUnicooTotvs | /Progress/migracao/_scripts_migracao_gps/listar_erros_import_propostas_ABC.sql | ISO-8859-1 | 263 | 3.171875 | 3 | [] | no_license | -- listar erros importao proposta por quantidades de ocorrncias
select e.des_erro, count(*)
from gp.erro_process_import e, import_propost p
where e.num_seqcial_control = p.num_seqcial_control
and p.ind_sit_import = 'PE'
group by e.des_erro order by 2 desc;
| true |
197a1e4ad3dec9d942e3cd9f13cc744612171942 | SQL | abe-xtivia/RedShift-Scripts | /create scripts/sizmek/sizmek_ads.sql | UTF-8 | 1,053 | 2.875 | 3 | [] | no_license | CREATE TABLE mec_us_trp.sizmek_ads
(
adid bigint NOT NULL ENCODE raw primary key,
adname varchar(900) NOT NULL ENCODE zstd,
placementid bigint NOT NULL ENCODE raw references mec_us_trp.sizmek_placements(placementid),
description varcha... | true |
01f9d93f4e2183b01b0d22382610c11f47ff5839 | SQL | dezareo/simple_php_apps | /shoutbox/shouts.sql | UTF-8 | 1,429 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 28, 2015 at 08:49 PM
-- Server version: 5.5.24-log
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
c971e9256522e271502e6016c8edb4628082be5e | SQL | nedkouchanov/SoftUni | /Java/JavaDB/MySQL/DB_INTRO_ex.sql | UTF-8 | 7,506 | 3.984375 | 4 | [] | no_license | CREATE DATABASE `minions`;
USE `minions`;
#Ex1
CREATE TABLE `minions`(
`id` INT PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
`age` INT
);
CREATE TABLE `towns`(
`town_id` INT PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(30) NOT NULL
);
#Ex2
ALTER TABLE `minions`
ADD COLUMN `town_id` INT,
ADD CONSTRAINT `fk_... | true |
2f9bb4ead2830690fb74192a210eb8f126b83555 | SQL | feixuekeji/qrcodeLogin | /demo.sql | UTF-8 | 557 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`gender` tinyint(3) NOT NULL DEFAULT '0' COMMENT '性别1男2女0未知',
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户昵称',
`openid` varchar(60) NOT NULL DEFAULT '',... | true |
67c252c3ce0115af17af10ff77fe862777d9a8d5 | SQL | cardiac-game/cardiac-game | /db/getCurrentGameRank.sql | UTF-8 | 166 | 3.03125 | 3 | [] | no_license | SELECT rank, nickname, score FROM (SELECT ROW_NUMBER() OVER(ORDER BY score desc) as rank, gameid, nickname, score FROM leaderboard ) ranking
WHERE ranking.gameid = $1 | true |
1335923dcc1ef65e8327ff5963366c3df100a398 | SQL | ptomulik/veetou | /share/oracle/packages/veetou/packages/get.pkb | UTF-8 | 8,701 | 3.203125 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE BODY V2U_Get AS
FUNCTION University(abbriev IN VARCHAR2 := NULL, name IN VARCHAR2 := NULL)
RETURN V2u_University_t
IS
l_university V2u_University_t;
BEGIN
-- Parameter names are prefixed with 'University.' to resolve the
-- problem with column name p... | true |
24154a86351a6924ffdae449f9840ccc07462b18 | SQL | fjyange/test-test | /db_schema/mysql/mysql_bus_table.sql | UTF-8 | 6,274 | 3.671875 | 4 | [] | no_license | DROP TABLE IF EXISTS FS_T_BIDDER;
CREATE TABLE FS_T_BIDDER
(
ID VARCHAR(32) NOT NULL COMMENT '主键ID',
V_CA_USER_ID VARCHAR(32) COMMENT 'CA用户表ID',
V_JSON_OBJ LONGTEXT COMMENT '其他扩展信息',
V_BUS_FILE_ID VARCHAR(32) COMMENT '营业执照附件ID',
V_QUAL_FILE_ID VARCH... | true |
556339df6d2428d4d013be13bbef3341f0c0da26 | SQL | SSShinorina/university_management | /finalproject/finalproject.sql | UTF-8 | 15,001 | 3.09375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 15, 2017 at 11:31 AM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
18d002c402a33270044f9cc60f7ffd302fe033b3 | SQL | mahmod1996/salessite | /127_0_0_1.sql | UTF-8 | 14,215 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 06, 2017 at 12:51 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.