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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0e5b252dc93e6e4d48f15bb083fc7439d8ff82b5 | SQL | pfatcat/checkbook | /src/data/create_schema.sql | UTF-8 | 1,127 | 4 | 4 | [] | no_license |
DROP TABLE IF EXISTS transactions;
DROP TABLE IF EXISTS payee_lookup;
DROP TABLE IF EXISTS payees;
DROP TABLE IF EXISTS categories;
PRAGMA foreign_keys = ON;
CREATE TABLE categories
(id UUID PRIMARY KEY,
name VARCHAR(255) UNIQUE,
inserted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
--create default category record
... | true |
50776a7fb009df5223ccfc06d492a764f5c69b46 | SQL | saumy1110/ftp01 | /database/database.ddl | UTF-8 | 536 | 3.25 | 3 | [] | no_license | -- change this to your team id
use FTP01;
-- comment this line for the very first time
drop table if exists EMPLOYEE;
-- create the table
create table EMPLOYEE (EMP_ID int primary key);
--Update the table
UPDATE EMPLOYEE SET EMP_ID=1005 WHERE EMP_ID=1000;
--to SELECT the table
SELECT * FROM EMPLOYEE;
--delete ... | true |
d6e6832b06f1b8ec579cfe668fef8298f0492581 | SQL | PrachiGupta/Contact-Application | /src/main/resources/migrations/1536672202-create-contacts.sql | UTF-8 | 510 | 3.1875 | 3 | [] | no_license | --liquibase formatted sql
--changeset john_doe:1536672202
CREATE TABLE `contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(50) NOT NULL DEFAULT '',
`name` varchar(100) DEFAULT NULL,
`type` varchar(10) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
`created_at` bigint(20) NOT NULL,
`updat... | true |
2c8210362130a59153bdfdcb90b43956bd5a86af | SQL | mrkaptep/lifestailend | /db/post/get_tag_for_post.sql | UTF-8 | 459 | 2.953125 | 3 | [] | no_license | SELECT
tailend_posts.post_id,
tailend_posts.author_id,
tailend_posts.date_created,
tailend_posts.title,
tailend_posts.content,
post_tags.tag_id,
tailend_tags.tag
FROM tailend_posts
JOIN post_tags on tailend_posts.post_id = post_tags.post_id
JOIN tailend_tags on tailend_tags.tag_id = post_tags.tag_id
-- SELECT * FROM ... | true |
d38b2ffbe0412a0e9410cef42e4f7f60eba80d30 | SQL | czbone/magic3 | /include/sql/update/2010071301_to_2010072301.sql | UTF-8 | 2,188 | 2.640625 | 3 | [] | no_license | -- *
-- * バージョンアップ用スクリプト
-- *
-- * PHP versions 5
-- *
-- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
-- *
-- * @package Magic3 Framework
-- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
-- * @copyright Copyright 2006-2010 Magic3 Project.
-- * @license http://... | true |
7a60807cd72d9e8363699a9afca972e478949ef5 | SQL | paolino/mootzoo | /schema.sql | UTF-8 | 1,397 | 3.703125 | 4 | [
"MIT"
] | permissive | CREATE TABLE users (
id integer primary key autoincrement not null,
email text not null,
login text unique,
inviter integer references users,
vote integer
);
CREATE TABLE messages (
id integer primary key autoincrement not null,
message text not null,
... | true |
86071efea6c322332f96643e6f29f164f603fff7 | SQL | Partanennn/WebOhjelmoinninHarkkaTy- | /SQL/Database.sql | UTF-8 | 1,590 | 3.953125 | 4 | [] | no_license | CREATE DATABASE kanta;
USE kanta;
-- Käyttäjien tietokanta
CREATE TABLE kanta.users
(
username varChar(20) NOT NULL PRIMARY KEY,
pass varChar(20) NOT NULL,
name varChar(40) NOT NULL,
streetAddress varChar(80),
city varChar(40),
email varChar(60),
role varChar(20) NOT NULL DEFAULT "user"
)
E... | true |
6293a13979013baa8083f9600256e0ccf24fdd1a | SQL | TERRANZ/terramail | /init.sql | UTF-8 | 5,523 | 2.984375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `terramail` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `terramail`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: terramail
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_... | true |
6a09da9b43d4be9cc71a864084cbceb1c94262ed | SQL | CaiShiJun/spring-boot2.0-test001 | /gitee-mr_beany-mySpringBoot/sql_script/sys_perm.sql | UTF-8 | 1,457 | 3.078125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhostDB
Source Server Version : 50720
Source Host : localhost:3306
Source Database : demo
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2018-07-31 22:40:28
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... | true |
7bb11296462375147406f92894b8e3d881234ed1 | SQL | dev-seahouse/imfweb | /sql/Dump20140201-2-nodata.sql | UTF-8 | 8,489 | 3.15625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `fyp_imf` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `fyp_imf`;
-- MySQL dump 10.13 Distrib 5.6.11, for Win32 (x86)
--
-- Host: localhost Database: fyp_imf
-- ------------------------------------------------------
-- Server version 5.6.12-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
d17dfc6a54763520f201f611ec9894afc2040cb6 | SQL | huatuostudio/SQLScripts | /ShrinkFile.sql | UTF-8 | 647 | 2.9375 | 3 | [] | no_license | # Shrink DB files
# Update [your_db_name]
ALTER DATABASE [your_db_name]
SET RECOVERY SIMPLE;
CHECKPOINT;
-- shrink the log file to 200MB
DBCC SHRINKFILE (your_db_name_log,200);
--- define the initial size to 200MB as well.. CHANGE it as per your needs!
ALTER DATABASE [your_db_name]
MODIFY FILE (NAME=your_db_name_LO... | true |
e90f7830f64e5adb22dfdd5780a2630d5ff3bf3e | SQL | rsoledade/Project_CreditRelease | /LiberacaoCredito/Scripts-DB/ListarClientesQueAtrasaram10Dias.sql | UTF-8 | 450 | 3.84375 | 4 | [] | no_license | SELECT
Cli.Nome, Cli.UF, Cli.Celular, Par.DataVencimento,
Fin.TipoFinanciamento, Fin.ValorTotal, Fin.QuantidadeParcelas,
Par.NumeroParcela, Par.ValorParcela, Par.DataPagamento
FROM
Clientes Cli
INNER JOIN Financiamentos Fin ON Cli.Id = Fin.IdCliente
INNER JOIN Parcelas Par ON Fin.Id = Par.IdFinanciamento
W... | true |
a586ec03b27e3fc6c7a4aa9ee927cf368ff3ef7e | SQL | FaizalMulki/Fastag-Publish | /fastag-15-6-2020.sql | UTF-8 | 17,784 | 3.15625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `fastag` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `fastag`;
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: fastag
-- ------------------------------------------------------
... | true |
2879ba3fdcd6c762c5ec2f8e594ffa837bd7a9e6 | SQL | DerekTBillings/Airmans_Attic | /Database/Table Script Update.sql | UTF-8 | 845 | 3.6875 | 4 | [] | no_license | CREATE TABLE admin_levels (
Admin_Level int AUTO_INCREMENT,
Admin_Level_Name Varchar(50) NOT NULL,
PRIMARY KEY(Admin_Level)
);
INSERT INTO admin_levels (Admin_Level, Admin_Level_Name)
Values (null, 'Admin'),
(null, 'Key Holder');
ALTER TABLE admin_accounts
ADD COLUMN Admin_Level int,
ADD CONSTRAINT fk_admi... | true |
50aa78b9dac54c5afcb4029e2467cd8baed9bc4d | SQL | ggslyman/Super-Street-Fighter-IV-Arcade-Edition-Lobby-System | /libs/cakephp/apps/ssf4ae/sql/ssf4ae_entries.sql | UTF-8 | 1,469 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.10.3
-- http://www.phpmyadmin.net
--
-- ホスト: mysql122.db.sakura.ne.jp
-- 生成時間: 2011 年 9 月 11 日 23:33
-- サーバのバージョン: 5.1.51
-- PHP のバージョン: 5.2.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_... | true |
206596b63483df96b2933896918357143881f3e6 | SQL | jrodriguez-infostecnologia/InfosPadelma | /Infos.Padelma.BD/dbo/Stored Procedures/Procs2/spSeleccionaNumeroDocumentoExistenteNominaDetalle.sql | UTF-8 | 349 | 2.6875 | 3 | [] | no_license |
CREATE PROCEDURE spSeleccionaNumeroDocumentoExistenteNominaDetalle
@Año int = 2016,
@Periodo int = 13,
@Empresa int = 1,
@Tipo varchar(50) = 'LQC'
AS
BEGIN
SELECT DISTINCT vLiq.numero
FROM
vLiquidacionDefinitivaReal vLiq
WHERE vLiq.empresa = @Empresa
AND vLiq.año = @Año
AND vLiq.noPeriodo = @Periodo
AN... | true |
3614d0c8b07ccf7598182f6e1bce09aecbddd4bf | SQL | uva-linklab/powerblade | /sql/create_tables.sql | UTF-8 | 6,183 | 3.8125 | 4 | [] | no_license | # Basic table creation stuff
# Only to be run once, but saved for records
# Create dat_blink table
CREATE TABLE dat_blink
(id int(11) not null auto_increment, gatewayMAC char(12), deviceMAC char(12),
curMot tinyint(1), advMot tinyint(1), minMot tinyint(1),
timestamp datetime,
primary key (id), index(gatewayMAC), ... | true |
9c208dff10e0a75ff4523dc8cf9dff741dc0d7ad | SQL | Carlos222Cuellar/java_rest | /parcial/postgres/posts.sql | UTF-8 | 33,221 | 2.859375 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.4
-- Dumped by pg_dump version 9.6.4
-- Started on 2017-11-23 17:13:02 CST
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_... | true |
018b147df8163a70fa78da3cc45ed4679b575c04 | SQL | thibaultvanc/migration-tool | /database/seeds_initials/sql/country.sql | UTF-8 | 13,902 | 2.65625 | 3 | [
"MIT"
] | permissive |
INSERT INTO `PLAY_country` (`id_country`, `id_currency`, `name`, `iso`, `indicative`, `relevance`, `region`, `is_state`) VALUES
(1, 2, 'Afghanistan', 'AF', '93', 0.00, 'asia', 0),
(2, 34, 'Åland Islands', 'AX', '358', 0.00, 'europe', 0),
(3, 1, 'Albania', 'AL', '355', 0.00, 'europe', 0),
(4, NULL, 'Algeria', 'DZ', '21... | true |
1163dacaf6aaeac7de37fe52318f5c3b8eb9a709 | SQL | kz3r/ppf-resetada | /src/main/resources/db/migration/postgresql/V1_0_0__core_ddl.sql | UTF-8 | 684 | 3.8125 | 4 | [] | no_license | CREATE TABLE playlist (
id VARCHAR PRIMARY KEY,
href VARCHAR NOT NULL,
name VARCHAR NOT NULL
);
CREATE TABLE track_log (
id VARCHAR NOT NULL,
name VARCHAR NOT NULL,
playlist_id VARCHAR NOT NULL,
artist_id VARCHAR NOT NULL,
artist_name VARCHAR NOT NULL,
album_id VARCHAR NOT NULL,
... | true |
2b297e8c972cdb23e08e8b88294a96bab2ac7ece | SQL | bognarpeter/BI2019W-G53 | /Assignment_1/task 2/etl/ETL_Product.sql | UTF-8 | 641 | 3.15625 | 3 | [] | no_license | INSERT INTO `BI_OLAP_53`.`DM_Product`
SELECT
P.`ProductID`,
P.`ProductNumber`,
P.`Name`,
P.`ProductModelName`,
P.`StandardCost`,
P.`ListPrice`,
PC1.`Name`,
PC2.`Name`,
P.`SellStartDate`,
P.`SellEndDate`,
P.`DiscontinuedDate`,
P.`Size`,
P.`Weight`,
IF(PC2.`Name`='Bikes' OR P.`ProductCategoryI... | true |
42310dcacb16765b456fc669dafda33d696b2ae9 | SQL | guillez/ramas | /sql/ddl/20_Tablas/sge_elemento.sql | ISO-8859-2 | 772 | 2.859375 | 3 | [] | no_license | -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- SIU-Kolla 4 - Mdulo de Gestin de Encuestas
-- Versin 4.3
-- Tabla: sge_elemento
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- DROP TABLE IF EXISTS sge_elemento;
CREATE TABLE sge_elemento
(
... | true |
4077004459ff17eec43d2deb7c7348e3ec4a4ace | SQL | sailyshah/Stock-market-analysis | /Assignment-stock market analysis-Saily Shah.sql | UTF-8 | 12,740 | 4.40625 | 4 | [] | no_license | create schema `assignment`;
### Use schema named 'assignment'
use `assignment`;
### Imported all the CSV files using "MySQL for excel" option in Excel
# Date column has been assigned as primary key in the excel before importing the dataset in MySQL
# created tables are named as bajaj_auto, eicher_motors, hero_motocor... | true |
befd3a25f46d5230280f800b0021033a26e7436f | SQL | jordanmoritz/covid-19-tracking | /dbt_covid_tracking/macros/test_malformed_country_code.sql | UTF-8 | 399 | 3.15625 | 3 | [] | no_license | {% macro test_malformed_country_code(model, column_name) %}
with malformed_country_code as (
select
{{ column_name }} as codes
from
{{ model }}
where
{{ column_name }} != 'CNG1925'
and length({{ column_name }}) != 3
group by
{{ column_name }}
having
c... | true |
3565159b9e1b06e699ec1e708c4ade9eb5c32b46 | SQL | QuangThoai/quangthoai.github.io | /PHP/Week_5/FrameWork/database/database_user.sql | UTF-8 | 3,740 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th3 18, 2019 lúc 09:32 AM
-- Phiên bản máy phục vụ: 10.1.31-MariaDB
-- Phiên bản PHP: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
6de8eb186e82de760ed054a8a609e913f940d2b5 | SQL | mundodron/arduino-bot-aurelio | /Querys/~ebA732.sql | UTF-8 | 1,220 | 2.734375 | 3 | [] | no_license | -- CENARIO;CONTA_COBRANCA;ACCOUNT;SUBSCR_NO;INSTANCIA;FAT_ATUAL;COMPONENTE_ID;COMPONENTE;COMENTARIO
-- C4 Produto Faltando;999988501203;2794447;5780198;999988501203;199493114;30492;GVT Ilimitado Total - Franquia LDN
SELECT *
FROM G0023421SQL.GVT_VAL_PLANO A
WHERE A.PLANO = (SELECT ... | true |
f23f12730d29e1dc936140a2897a4e1109c75a62 | SQL | B4129/sql-pratice | /answer/B/LEVEL4/39.sql | UTF-8 | 495 | 3.34375 | 3 | [] | no_license | select 商品コード,
商品名,
単価,
(case
when 単価 < 3000 then 'S'
when 単価 >= 3000 and 単価 < 10000 then 'M'
when 単価 >= 10000 then 'L'
end) as 販売価格ランク,
商品区分 || ':' ||
case 商品区分
when '1' then '衣類'
when '2' then '靴'... | true |
1d3d8acdb3edc12ae70272d6ff0ec24d73c6a791 | SQL | mastukino/Purchase | /inventori.sql | UTF-8 | 59,457 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 14, 2021 at 01:27 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
b454e6a95f72b5b2cc69aef537038d43a8979d83 | SQL | NeuralNoise/animurecs | /dbv/data/schema/anime_lists.sql | UTF-8 | 676 | 3.3125 | 3 | [] | no_license | CREATE TABLE `anime_lists` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`anime_id` int(10) unsigned NOT NULL,
`time` datetime NOT NULL,
`status` tinyint(3) unsigned NOT NULL DEFAULT '0',
`score` tinyint(3) unsigned NOT NULL DEFAULT '0',
`episode` smallint(5) uns... | true |
da7fe2ddccd597468880e8bc079446bd42b5a62d | SQL | jakeaharris/bluebottle_2018 | /sql/solution_1.sql | UTF-8 | 783 | 3.9375 | 4 | [] | no_license | WITH temp_prod_sum AS (
SELECT
hourly_dry_bulb_temp,
item_name,
sum(net_quantity) as item_count
FROM hourly_weather w
JOIN morse_store_data s
ON 1=1
AND strftime('%d-%m-%Y %H', w.date) = strftime('%d-%m-%Y %H', s.order_date)
WHERE 1=1
AND w.hourly_dry_bulb_temp != ''
... | true |
444063810a484ed238f217dd45c8e3682e063771 | SQL | jperitz/Kubernetes_Project2 | /db/colors.sql | UTF-8 | 228 | 2.6875 | 3 | [] | no_license |
CREATE DATABASE colors;
use colors;
CREATE TABLE fav_colors (
name VARCHAR(20),
color VARCHAR(10)
);
INSERT INTO fav_colors
(name, color)
VALUES
('Cynthia', 'blue'),
('Jonathan', 'green'),
('Richard', 'yellow');
| true |
a402f212bc3fc3d3a9ac33b906b2d58147ac38f4 | SQL | rubenorta/rest-api-demo | /app/config/database.sql | UTF-8 | 606 | 3.1875 | 3 | [] | no_license | SET NAMES 'utf-8';
CREATE DATABASE antevenio;
CREATE DATABASE antevenioTestdb;
CREATE USER 'antevenio'@'localhost' IDENTIFIED BY 'antevenio';
grant ALL ON antevenio.* TO 'antevenio'@'localhost';
grant ALL ON antevenioTestdb.* TO 'antevenio'@'localhost';
USE antevenio;
CREATE TABLE country (id INT AUTO_INCREMENT NOT N... | true |
f0423e7883e71635afe2d49ccd066fd809b91359 | SQL | viethoang1999/Thi-t-k-CSDL | /Hàng hóa.sql | UTF-8 | 1,056 | 3.3125 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS `db_hanghoa` DEFAULT CHARACTER SET utf8 ;
USE `db_hanghoa` ;
CREATE TABLE IF NOT EXISTS `db_hanghoa`.`MATHANG` (
`MH` INT NOT NULL AUTO_INCREMENT,
`TENHANG` VARCHAR(45) NULL,
`DVT` VARCHAR(45) NULL,
`SLHC` VARCHAR(45) NULL,
`GBHT` VARCHAR(45) NULL,
PRIMARY KEY (`MH`));
CREATE T... | true |
5985cd8e27452c14d6681f3ed9019a92ad4449dc | SQL | AkosCzifra/ask-mate-python | /sample_data/askmatepart2-sample-data-demo-version.sql | UTF-8 | 13,369 | 3.21875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.6
-- Dumped by pg_dump version 9.5.6
ALTER TABLE IF EXISTS ONLY public.question DROP CONSTRAINT IF EXISTS pk_question_id CASCADE;
ALTER TABLE IF EXISTS ONLY public.answer DROP CONSTRAINT IF EXISTS pk_answer_id CASCADE;
ALTER TABLE IF EXISTS ONLY pu... | true |
db0fa9a9625e74f64a7d7498da0683cba9a99f15 | SQL | Magomedali/bitrix_chat | /social.chat/install/db/mysql/exists_new_msg.sql | UTF-8 | 230 | 2.828125 | 3 | [] | no_license | create function exists_new_msg (p_id int,p_msg int)
RETURNS int
DETERMINISTIC
BEGIN
declare v_c int default 0;
SELECT COUNT(1) INTO v_c FROM `ali_social_messages` WHERE `TOPIC_ID` = p_id AND `ID` > p_msg;
return v_c;
END; | true |
ea9b18e47bc2bf6f59beeba00f0e89ff27f14c0e | SQL | lizouzt/saas | /data/sql/postgres/inventory/tables/locations.sql | UTF-8 | 1,051 | 3.890625 | 4 | [] | no_license | /**
* locations table
*/
create table if not exists locations (
id uuid not null,
active boolean not null default false,
created_ts timestamp without time zone not null default(now() at time zone 'utc'),
client_id uuid not null,
facility_id uuid not null,
name varchar(100) not null,
floor_... | true |
2e566ea16e1c96c27d06daf9c2a6d69b1e83e522 | SQL | tcjwj2008/K3SystemCollection | /现金流量表.sql | UTF-8 | 2,956 | 3.1875 | 3 | [] | no_license | select c.* from ( select v.FVoucherID,v.FDate,Convert(VarChar,FYear) + '.' + Convert(VarChar,FPeriod) FPeriod1,g.FName + '-' + Convert(VarChar,v.FNumber) FNumber,e.FExplanation,e.FEntryID, a.FNumber FAcctNumber, a.FFullName FAcctName,e.FDC, e.FAmountFor,e.FAmount,e.FDetailID, c.FItemID, c.FSubItemID,r.FName FCurre... | true |
611ec1d2f9a8de6ce6dadebccc78b9859cc10893 | SQL | ijwfly/simple_billing_assignment | /migrations/sql/init.sql | UTF-8 | 968 | 3.859375 | 4 | [] | no_license | CREATE SCHEMA billing;
CREATE TYPE billing.transaction_status AS ENUM ('registered', 'completed', 'declined', 'error');
CREATE TYPE billing.direction AS ENUM('credit', 'debit');
CREATE TABLE billing.transaction
(
id bigserial PRIMARY KEY,
operation_id text NOT NULL,
wallet_id bigint NOT NULL,
status b... | true |
79f527df2e69546e40fca4d35c15385ac5300b8c | SQL | JecoLantern/Portfolio-JBA-v2.0 | /models/schema.sql | UTF-8 | 394 | 2.734375 | 3 | [] | no_license | DROP DATABASE IF EXISTS portfoliodb;
CREATE DATABASE portfoliodb;
USE portfoliodb;
CREATE TABLE ContactDB (
id INT(10) AUTO_INCREMENT NOT NULL,
firstname VARCHAR(255),
lastname VARCHAR(255),
email VARCHAR(255),
message MEDIUMTEXT,
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
PR... | true |
442be62d3b40550072d7251144782a62791f9b69 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day26/select1407.sql | UTF-8 | 262 | 2.984375 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['5074','2100_8','2222','3243','2038','3052','4062','3099','6210','4212'])
| true |
b9becfd8a76e3e1e62d553abb7c37cbc6c2236ef | SQL | VladCincean/Piscine-PHP | /day_05/ex11/ex11.sql | UTF-8 | 234 | 3.53125 | 4 | [] | no_license | SELECT UPPER(fp.nom) AS 'NOM', fp.prenom, ab.prix
FROM fiche_personne AS fp
INNER JOIN membre AS me
ON fp.id_perso = me.id_fiche_perso
INNER JOIN abonnement ab
ON me.id_abo = ab.id_abo
WHERE ab.prix > 42
ORDER BY nom ASC, prenom ASC;
| true |
c0bd377b9bec891c9eb59202050883a98da93387 | SQL | gmgj/Personal | /gjtest/getPhoneCode.sql | UTF-8 | 279 | 2.890625 | 3 | [] | no_license | /*
*/
DROP FUNCTION IF EXISTS getPhoneCode;
DELIMITER $$
CREATE FUNCTION getPhoneCode
(phone varchar(99))
RETURNS varchar(99)
DETERMINISTIC
SQL SECURITY DEFINER
BEGIN
IF (LENGTH(phone) < 11) THEN
RETURN ' ';
END IF;
return SUBSTRING(phone, 5);
END $$
DELIMITER;
| true |
70a245f5922e3d9a67bcebd53b88ce71ba8f21e2 | SQL | Pubuduboteju/Mini-java-project | /vehicle_details.sql | UTF-8 | 2,109 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 07, 2018 at 12:10 PM
-- Server version: 5.7.19
-- PHP Version: 7.0.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
b970b4f7a2f0b5430a5fed943ec9f423a648bffd | SQL | BrunoCarvalho18/postgres-estudos | /sequencias.sql | UTF-8 | 625 | 3.46875 | 3 | [] | no_license | CREATE SEQUENCE eu_criei;
SELECT NEXTVAL('eu_criei');
CREATE TEMPORARY TABLE auto(
id INTEGER PRIMARY KEY DEFAULT NEXTVAL('eu_criei'),
nome VARCHAR(30) NOT NULL
);
DROP TABLE auto;
INSERT INTO auto(nome) VALUES('Bruno Carvalho');
INSERT INTO auto(id,nome) VALUES('Bruno Carvalho');
INSERT INTO auto(nome) VALUES('... | true |
341bedf6ca5b713cd58764e0c0c321b45c68efeb | SQL | MRIDULA-S/SQL | /update and delete.sql | UTF-8 | 547 | 3.34375 | 3 | [] | no_license | create database office;
use office;
create table employee
(
ID int NOT NULL auto_increment,
name varchar(20) NOT NULL,
age int NOT NULL,
address varchar(20) NOT NULL,
salary int NOT NULL,
primary key(ID)
);
insert into employee (name,age,address,salary) values ('Ramesh',32,'Ahmedabad',2000),
('Khilan',25,'Delhi',1500),... | true |
a859711dc72368d0d935111cbae92c36fe3b9d13 | SQL | Lambert6/BYSJHL | /build/classes/zhangqq009.sql | UTF-8 | 10,213 | 3.234375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : zhangqiqi
Source Server Version : 50536
Source Host : localhost:3306
Source Database : zhangqq009
Target Server Type : MYSQL
Target Server Version : 50536
File Encoding : 65001
Date: 2017-11-06 13:49:24
*/
SET FOREIGN_K... | true |
0bfd162d823034e860880eb6b0cba8c1eba1c867 | SQL | tesseract2048/machine | /machine-dao/src/main/resources/qunar.sql | UTF-8 | 5,250 | 3.375 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : 9localhost
Source Server Type : MySQL
Source Server Version : 50619
Source Host : localhost
Source Database : qunar
Target Server Type : MySQL
Target Server Version : 50619
File Encoding : utf-8
Date: 11/02/2015 00:50:42 A... | true |
fbdf077da02276250fb1dcc65abf34a9da052dcd | SQL | khansaawan/Indian-Premier-League-SQL-Queries | /IPL_Queries/IPL_28.sql | UTF-8 | 319 | 3.96875 | 4 | [] | no_license | -- Number of hosted matches season wise
SELECT
RANK() OVER ( ORDER BY Season.Season_Year ) As Season_Id,
Season.Season_Year ,
COUNT(*) As 'Hosted Matches'
FROM Match
INNER JOIN Season
ON Match.Season_Id = Season.Season_Id
GROUP BY GROUPING SETS ( Season.Season_Year , ())
ORDER BY Season_Id | true |
f5567f28cd61c54ae35634fdf6accfae16c45421 | SQL | viniciusnascimento95/web_sistema_venda_simples_jsf | /web/Script banco/tecweb.sql | UTF-8 | 1,285 | 3.890625 | 4 | [] | no_license | create table cliente (
id serial not null,
nome varchar unique not null,
email varchar unique not null,
telefone varchar
);
select * from cliente;
create table fornecedor (
id serial not null,
nome varchar not null,
cnpj varchar not null,
email varchar not null,
telefone varchar not null,
endereco varcha... | true |
0dfe77c0aa8ab3c31556efd3e1279f5b2eb24e93 | SQL | samshum90/GCU_MySQL | /top-level.sql | UTF-8 | 1,207 | 2.75 | 3 | [] | no_license | -- create database coursework;
use coursework;
select "1" as ``;
select "Inside script <top-level.sql>" as ``;
select "-----------------------------" as ``;
select "Switching the foreign keys ON/OFF" as ``;
--
-- If you have problems with legacy data in your database,
-- as a result of not cascading deletes in child... | true |
e958d5c89452eb4493d792b8b5c034feb3db0974 | SQL | madger/projektowanie_wspolbiezne | /projektowanie_wspolbiezne_db.sql | UTF-8 | 5,032 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Czas wygenerowania: 30 Kwi 2014, 01:47
-- Wersja serwera: 5.6.12-log
-- Wersja PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
68f7314f7f66a6f0efcccc44b0373519037607e6 | SQL | AlenaTskh/Intellectual-Property-Infringement-Prediction-for-2021 | /Advanced Data/HW4.sql | UTF-8 | 1,975 | 4.6875 | 5 | [] | no_license | use BI_Marathon_Alena;
Select * From product;
INSERT INTO product (product)
Values ('Facebook'),
('Instagram')
;
DELETE FROM product WHERE product_id in (3,4);
DELETE FROM product WHERE product_id in (5,6);
DELETE FROM product WHERE product_id in (7,8);
DELETE FROM product WHERE product_id in (9,10);
-- Finding Dub... | true |
ec8004e8fe3d12388e46d826758f2ef0f6cd2c0a | SQL | nathanmangrum/data | /Transaction-Products.sql | UTF-8 | 444 | 3.390625 | 3 | [] | no_license | CREATE TABLE transactionsProduct (
trans_id uuid NOT NULL,
product_id uuid NOT NULL,
quantity int NOT NULL,
created_at timestamp without time zone NOT NULL DEFAULT now(),
updated_at timestamp without time zone NOT NULL DEFAULT now(),
FOREIGN KEY (trans_id) REFERENCES transactions (id),
FOREIGN KEY (produ... | true |
0d9c260659227ed7e6f179613b46ef07b2b2c938 | SQL | gramundi/scripting | /sql/super_admin.sql | UTF-8 | 816 | 3.859375 | 4 | [] | no_license | --##Make a User Super Admin for all the Studies
set search_path to umgr;
--Clean Up the acces privileges fro the users
delete from user_role where user_id = (select user_id from users where user_name='giovanni.ramundi');
insert into user_role
(
select
(select user_id from users where user_name = 'giovanni.ramundi' ... | true |
2ac5c6c797140a4f27d68ac99318d896877d5a3a | SQL | jwmcconnell/alchemy-type-api | /postgres/seed/seed.sql | UTF-8 | 526 | 3 | 3 | [] | no_license | BEGIN TRANSACTION;
INSERT into users (name, email, joined)
values ('john', 'john@gmail.com', '2018-01-01');
INSERT into login (hash, email)
values ('$2a$10$0umiOSkXu//nmGjZxQZr9OEix8a89OjRRLA/PCFZJbOpN/juGpkAu', 'john@gmail.com');
INSERT into stats (user_id, passages, avg_wpm, avg_errors)
values ('1', '0', '0', '0')... | true |
fba48013db03f5e478f3903cc64d70700051999a | SQL | davejlong/budget_tracker_demo | /db/data.sql | UTF-8 | 1,682 | 2.6875 | 3 | [] | no_license | --
-- 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;
--
-- Data for Name: budgets; Type: TABLE DATA; Schema: pu... | true |
3495e753fe3c6d37d1f63acba8781798e40f989e | SQL | SeulkiDo/SemiProject | /SemiProject.sql | UTF-8 | 2,817 | 3.40625 | 3 | [] | no_license | create user semi identified by semi;
grant connect, resource to semi;
commit;
--------------------------------------------------------------------------------
create table members(
m_email varchar(30) primary key,
m_pw varchar(100),
m_name varchar(20) not null,
m_phone varchar(20),
m_zipcode varch... | true |
271cdc52b5b91449f5283d54b72768d51c118706 | SQL | PavelWhiteTiger/Databasescourse | /7L/Task2.sql | UTF-8 | 332 | 3.375 | 3 | [] | no_license | use shop;
create table if not exists accounts(
id INT PRIMARY KEY,
name VARCHAR(255),
password varchar(255)
);
CREATE VIEW USERNAME
as select id,name
FROM accounts;
create user 'username_read'@'localhost' identified with sha256_password by'pass';
grant select on shop.username to 'username_read'@'local... | true |
9a05ec6ae48c201cff1726eccafec25384af33a2 | SQL | DaviRP2018/database | /create_table.sql | UTF-8 | 1,319 | 3.03125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS telegram.users (
id INT PRIMARY KEY,
is_bot BOOLEAN NOT NULL,
first_name VARCHAR(255) NOT NULL,
username VARCHAR(255) UNIQUE NOT NULL,
last_name VARCHAR(255),
language_c... | true |
00a0c1e03547bb0b8a2f8d501fc292b3c9c6e117 | SQL | IlyaLun/342717-doingsdone | /queries.sql | UTF-8 | 2,092 | 3.640625 | 4 | [] | no_license | # добавление категорий
INSERT INTO category (title, user_id) VALUES
('Входящие', '1'),
('Учеба', '1'),
('Работа', '1'),
('Домашние дела', '1'),
('Авто', '1');
# добавление пользователей
INSERT INTO users (email, name, password, date_registration) VALUES
('ignat.v@gmail.com', 'Игнат', '$2y$10$OqvsKHQwr0Wk6F... | true |
15b8fe55bc4b7a0f8dd9dd65dd4c4715822e1ed7 | SQL | da99/megauni.alpha | /Server/Card/migrates/card_insert/00-create.sql | UTF-8 | 1,161 | 3.796875 | 4 | [
"MIT"
] | permissive |
INSERT INTO link (
type_id,
owner_type_id, owner_id,
a_type_id, a_id,
b_type_id, b_id
)
VALUES (
IDS[1],
IDS[2], screen_name_id_if_owns_or_fail(USER_ID, SCREEN_NAME),
IDS[3], card_id_or_fail(USER_ID, A_ID),
IDS[4], screen_name_id_if_owns_or_fail(USER_ID, SCREEN_NAME)
);... | true |
f41fa58ff72688429334d89692dfe49fae16f14a | SQL | gsangeryee/overlapping | /overlapping.sql | UTF-8 | 245 | 2.765625 | 3 | [] | no_license | Select * From tables
Where (segment_start <= previous_start AND segment_end >= previous_start)
OR (segment_start >= previous_start AND segment_end <= previous_end)
OR (segment_start <= previous_end AND segment_end >= previous_end ) | true |
e8917cd83cbe4b52367a31faf5617de39d6dcb34 | SQL | qq57694878/study | /daily/database/oracle/execute immediate sql.sql | UTF-8 | 413 | 2.828125 | 3 | [] | no_license | create or replace procedure execsql
(
name varchar2
)
is
type org_type is table of t_org%rowtype;
v_orgdata org_type;
v_sql varchar2(4000);
begin
v_sql:=v_sql||'select * from t_org where name like :1';
execute immediate v_sql
bulk collect into v_orgdata
using '%'||name||'%';
for i in 1..v_orgdata.count
... | true |
3a4907cba65800d7a1e289257d1e5bc56e397274 | SQL | provashish95/MVC | /db_student.sql | UTF-8 | 2,406 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 03, 2020 at 09:43 PM
-- Server version: 10.1.40-MariaDB
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
7d14f724992ddfda303477061eb98f323327fdf6 | SQL | Sowmya574/Cognizant-Early-Engagement | /SQL Programming/Buses based on Source and Destination/query.sql | UTF-8 | 424 | 3.84375 | 4 | [] | no_license | select distinct s1.bus_no,
b.bus_name
from schedule s1
inner join schedule s2 on s1.source = s2.destination
and s1.destination = s2.source
inner join buses b on s1.bus_no = b.bus_no
order by s1.bus_no;
select distinct s1.bus_no,
b.bus_name
from schedule s1,
schedule s2,
buses b
where s1.sou... | true |
4ea09caf7a517f8eaf22f893300101dfc7ac0e7d | SQL | hubena/command.file | /SQL/用过的sql语句.sql | UTF-8 | 650 | 3.875 | 4 | [] | no_license | #建表:
create table test3.car (
id int auto_increment comment '车的ID',
carname varchar(25) not null comment '车名',
primary key (id),
unique index carname_idex (carname asc)
) comment = '车表';
insert into test3.car (carname) values('红色');
select * from test3.car;
create table carcolour (
colourID int comme... | true |
093f826d0bac6b0c1159b24a9bf2d870ecdc77a5 | SQL | dennishemken/ination | /Goldmine/main_contact_info.sql | UTF-8 | 3,284 | 2.578125 | 3 | [] | no_license | SELECT DISTINCT
"public"."new_contact_id"."contact_id",
"public"."contacts_export1"."COMMENTS"as "Internal Notes",
"public"."contacts_export1"."COMPANY" as "Company Name",
"public"."contacts_export1"."CONTACT",
"public"."contacts_export1"."DEAR",
"public"."contacts_export1"."DEPARTMENT",
"public"."contacts_export1"."KE... | true |
62e49657362ab39475ea923962b70a8df9eb7688 | SQL | murari-goswami/bi | /ETL/DataVirtuality/views/ml/ml.article_age_distribution.sql | UTF-8 | 1,412 | 4.125 | 4 | [] | no_license | -- Name: ml.article_age_distribution
-- Created: 2015-04-24 18:23:47
-- Updated: 2015-04-24 18:23:47
CREATE VIEW ml.article_age_distribution AS
SELECT
am.article_id,
f.molor_mean_age,
f.molor_stddev_age,
f.model_mean_age,
f.model_stddev_age,
f.brand_mean_age,
f.brand_stddev_age
FROM
(SELECT
... | true |
bb73cbc3a52109423e8dc40046d0e4905d4d650b | SQL | siddhartha-Infy01/my-ref-code | /dbscripts/PRC/queryRecentlyAdded.sql | UTF-8 | 19,388 | 3.5 | 4 | [] | no_license | drop procedure if exists queryRecentlyAdded;
DELIMITER $$
CREATE PROCEDURE `queryRecentlyAdded`(nwid VARCHAR(25),time_param int,commodityids VARCHAR(25),locationids VARCHAR(25),occupationids VARCHAR(25))
BEGIN
DROP TABLE IF EXISTS _tmpshare;
CREATE TEMPORARY TABLE _tmpshare (nwtid varchar(25));
TRUNCATE TA... | true |
f117bfec51b7c5b14862ca603e1d6b227f2ddc09 | SQL | Blake-Trapnell/Skillscheck3 | /db/seed.sql | UTF-8 | 538 | 3.015625 | 3 | [] | no_license | CREATE table houses (
id serial primary key,
name VARCHAR(255)
address VARCHAR(255),
city VARCHAR(100),
state VARCHAR(2),
zip int,
img text
mortgage decimal
rent decimal
);
INSERT INTO houses (name, address, city, zipcode, state)
VALUES ('Pheasant Pointe 5 bed 3 bath', '553 Pheasant Pointe dr', 'Lehi', '84505', 'UT'),... | true |
e41bd58fedb66115ff82d019f98f8e8ec4dd8008 | SQL | priyajain1312/PHP-CRUD | /contact_db.sql | UTF-8 | 2,581 | 3.3125 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
-- Database: `Contact_db`
--
-- --------------------------------------------------------
--
-- Table structure for table `admins`
--
CREATE TABLE `admins` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
... | true |
d58a877677d7d1290abbdf26e51ed681a86ad590 | SQL | nascimentolh/JBlueHeart-Source | /L2J_SunriseProject_Data/dist/tools/sql/sunrise_sql_files/hwid_info.sql | UTF-8 | 587 | 2.859375 | 3 | [] | no_license | -- ----------------------------
-- Table structure for `hwid_info`
-- ----------------------------
DROP TABLE IF EXISTS `hwid_info`;
CREATE TABLE `hwid_info` (
`HWID` varchar(32) NOT NULL DEFAULT '',
`WindowsCount` int(10) unsigned NOT NULL DEFAULT '1',
`Account` varchar(45) NOT NULL DEFAULT '',
`PlayerID` int(... | true |
374ff2c33539f4ab8a18b64070ed2b530d6ee325 | SQL | tusharmaroo/ren16 | /api/ren16.sql | UTF-8 | 2,102 | 3.359375 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS `Coordinators` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`email` varchar(100),
`eventid` int(11) NOT NULL,
`phone` varchar(15) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `EventCate... | true |
559741622772e74be05a67c12b822ca0891d25df | SQL | JorgeDuenasLerin/basesdedatos-dam1 | /apuntes/3/trabajosCreacionTablas/Entraga_SQL_Jorge_Rodriguez_Martinez/Entraga SQL Jorge Rodriguez Martinez/1.sql | ISO-8859-1 | 3,479 | 3.734375 | 4 | [] | no_license | drop table acabado cascade constraints;
drop table acabado_coche cascade constraints;
drop table alquileres cascade constraints;
drop table categorias cascade constraints;
drop table cliente cascade constraints;
drop table coches cascade constraints;
drop table alquiler cascade constraints;
select table_nam... | true |
b5288d4d868cd271424da23d2292f25ae4e9500b | SQL | echo511/TreeTraversal | /tests/_data/dump.sql | UTF-8 | 793 | 2.671875 | 3 | [
"MIT"
] | permissive | -- Adminer 4.2.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `tree`;
CREATE TABLE `tree` (
`title` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`lft` int(11) NOT NULL,
`rgt` int(11) NOT NULL,
`dpt` int(11) NOT NU... | true |
3a4f83c8e11a5d388b0ca307841941d1d673d692 | SQL | arinpro/sql-server-administration-scripts | /Search_Plan_Cache/search_plan_cache_with_details.sql | UTF-8 | 1,264 | 4.0625 | 4 | [] | no_license | SELECT top 25
db.name AS [db_name],
qsts.creation_time,
qsts.last_execution_time,
qsts.execution_count,
qtxt.text AS [query_text],
CAST(CAST(qsts.total_worker_time AS DECIMAL)/CAST(qsts.execution_count AS DECIMAL) AS INT) AS [cpu_per_execution],
CAST(CAST(qsts.total_logical_reads AS DECIMAL)/CAST(qsts.execution... | true |
d5995f14151242681e8a9d325a687670026979e7 | SQL | OldChris/Bootstrap_Login_System | /mysql/db_init_script/build_session_db.sql | UTF-8 | 2,117 | 3.109375 | 3 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+01:00";
CREATE TABLE `users` (
`id` int(11) AUTO_INCREMENT,
`customerid` int(11) NOT NULL DEFAULT '0',
`name` varchar(255),
`email` varchar(255),
`role` varchar(255),
`password` varchar(255),
`code` mediumint(50),
`code_time` int(1... | true |
752574c76f8dabc94b849c1c2808821828655ae2 | SQL | GYSolver/shopping_centre | /SQL/review.sql | UTF-8 | 661 | 3.03125 | 3 | [] | no_license | CREATE TABLE `review` (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
order_id INT UNSIGNED NOT NULL,
user_id INT UNSIGNED NOT NULL,
username VARCHAR(50) NOT NULL DEFAULT '',
product_id INT UNSIGNED NOT NULL,
product_name VARCHAR(50) NOT NULL DEFAULT '',
product_specification VARCHAR(100) NOT NUL... | true |
7e0d7717802e01b05d28b9ea388eed060b951a1d | SQL | mozilla/marketing-analytics | /bqQueries/WIP/missingCampaignsTelemetry/compareFetchtoGA.sql | UTF-8 | 1,662 | 4.125 | 4 | [] | no_license | WITH data as(
SELECT
fetchData.Adname as fetchAdName,
adDetails.Device as device,
adDetails.OperatingSystem as OperatingSystem,
fetchData.vendorNetSpend as vendorNetSpend,
fetchData.downloadsGA as fetchDownloadsGA,
GA.content as gaContent,
GA.downloads as gaDownloads,
GA.nonFXDownloads as gaNonFXDownloads
FROM(
(SELECT... | true |
a316aacf152f2cdf5b72b6a08740dde056fbadc2 | SQL | CasperPlatform/Node.js_SmartCar_API_Server | /db.sql | UTF-8 | 403 | 2.546875 | 3 | [
"MIT"
] | permissive | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE users(id INTEGER PRIMARY KEY, username VARCHAR(25), password blob, salt blob);
INSERT INTO "users" VALUES(1,'admin',X'64A4280C6F3FC3C43ECFDA04F7DEE96D2233ABFF92D387EFCA2EF51CBF4EE5C0',X'CDDAC7FC352A1BDDCFC01590A84A81196F2D0EC26ED0E7248B2C7552C962A5D1');
CREATE TA... | true |
4b540b481771e1c626c35cd8a97d3bb3f25a7436 | SQL | zeamaria/BootcampX | /3_queries_group_by/average_completion_time.sql | UTF-8 | 252 | 3.640625 | 4 | [] | no_license | SELECT students.name as student, avg(average_assignment_duration.*) AS average_assignment_duration
FROM students
JOIN assignment_submissions ON student_id = students.id
WHERE end_date IS NULL
GROUP BY student
ORDER BY average_assignment_duration DESC; | true |
4edcfc5d851e5c7244103f93be5ebf46b35bd945 | SQL | alejo4373/app-a-palooza-app | /server/db/schema.sql | UTF-8 | 526 | 3.53125 | 4 | [] | no_license | CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR,
n_job_apps_goal INT,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE job_applications (
id SERIAL PRIMARY KEY,
user_id INT REFERENCES users(id),
company_name VARCHAR,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE session (
sid VAR... | true |
dd85059d906caa49bcee2522b24d4011bed2cd16 | SQL | amit-k-s-pundir/computing-programming | /perl/web/catalyst-tutorials/CatalystTutorial/MyApp_Chapter9_FormHandler/MyApp/.svn/text-base/myapp03.sql.svn-base | UTF-8 | 212 | 2.53125 | 3 | [] | no_license | --
-- Add 'created' and 'updated' columns to 'book' table.
--
ALTER TABLE book ADD created TIMESTAMP;
ALTER TABLE book ADD updated TIMESTAMP;
UPDATE book SET created = DATETIME('NOW'), updated = DATETIME('NOW');
| true |
1c34c67ada562c03a45be47b1a01464784b31d64 | SQL | cgrutzmacher/students_db | /join_queries.sql | UTF-8 | 631 | 4.1875 | 4 | [] | no_license | SELECT s.name, cn.name from student s
LEFT OUTER JOIN coursesTaken ct ON s.id = ct.studentID
LEFT OUTER JOIN courseName cn ON ct.courseID = cn.id
ORDER BY s.name, cn.name;
SELECT s.name, COUNT(cn.name) AS 'Number of courses taken' FROM student s
LEFT OUTER JOIN coursesTaken ct ON s.id = ct.studentID
LEFT OUTER JOIN co... | true |
3ac5e3a88661f120236c03b5cb82ef844eb3ca4f | SQL | JeremyDa/antdlib | /src/main/resources/database/antdlib-table.sql | UTF-8 | 5,815 | 3.1875 | 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 */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014... | true |
84127196c518971fc909560b3a6321845a3fa529 | SQL | ElifKeles/Database-for-myShop | /project_updated.sql | UTF-8 | 14,687 | 3.4375 | 3 | [] | no_license | DROP DATABASE IF EXISTS `myShop`;
CREATE DATABASE `myShop`;
USE `myShop`;
SET NAMES utf8 ;
SET character_set_client = utf8mb4 ;
CREATE TABLE status
(
status_id INT PRIMARY KEY,
name VARCHAR(40)
);
INSERT INTO status VALUES(1, 'preparing');
INSERT INTO status VALUES(2, 'on the way');
INSERT INTO s... | true |
65f02de24d9bc8a24cb3ac1ce874f3adae3c9667 | SQL | GreyHumanBeing/Oracle_SQL | /4-Practica_DISTINCT.sql | UTF-8 | 149 | 2.703125 | 3 | [] | no_license | select distinct city
from locations;
select distinct department_id,
job_id
from employees | true |
801e382ef885649a67a526e9cf6c4905d138d3d7 | SQL | LM-loleris/RobloxPrinter | /MYSQL_DATABASE.sql | UTF-8 | 6,365 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 22, 2021 at 11:18 AM
-- Server version: 10.3.25-MariaDB-log
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... | true |
46ab23d62467295e8cdabcbaef5cecda50ddff12 | SQL | matthewrmettler/wikidelve | /db/queries/database_creation.sql | UTF-8 | 471 | 3.59375 | 4 | [] | no_license | CREATE TABLE entity (
id INTEGER PRIMARY KEY AUTOINCREMENT,
wiki_id INTEGER NOT NULL,
name text NOT NULL
);
CREATE UNIQUE INDEX idx_entity_wiki_id
ON entity (wiki_id);
CREATE TABLE entity_associations (
entity_id INTEGER PRIMARY KEY,
associated_ids text NOT NULL
);
CREATE TABLE lists (
list_i... | true |
6e7f0b7c05c991c0f11c0cc51807f060a8009f93 | SQL | nicolassnider/ms_sql_server_2019_development | /Facturas/create_table_Pedido.sql | UTF-8 | 273 | 3.078125 | 3 | [] | no_license | use Facturas
create table Pedido(
id int identity(1,1) not null,
fecha smalldatetime,
dni varchar(10) not null,
constraint pk_pedido PRIMARY KEY(
id ASC
),
constraint fk_pedido_cliente FOREIGN KEY(
dni
) REFERENCES Cliente
) | true |
02b1f20df2c64ffbc3cc7e34d00513d06c1c39ad | SQL | carlos793/QuerySql | /1_Base_triggers.sql | ISO-8859-1 | 1,115 | 3.671875 | 4 | [] | no_license | USE CURSO
--DROP TABLE FUNC
CREATE TABLE FUNC (
MATRICULA INT IDENTITY(1,1) PRIMARY KEY,
NOME VARCHAR(30) NOT NULL,
SOBRENOME VARCHAR (30) NOT NULL,
ENDERECO VARCHAR (30) NOT NULL,
CIDADE VARCHAR (30) NOT NULL,
ESTADO VARCHAR (2) NOT NULL,
DATA_NASC DATETIME
) ;
insert into func values ('Steve','Morse'... | true |
df89092c04b3fd8697cf2b6611f98e16725738c9 | SQL | shahimian/module-activities-timer | /models/db.sql | UTF-8 | 2,125 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 2019-06-15 11:53:25
-- Server version: 5.7.25-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";
/*!40101 SET @OLD_... | true |
ea8c83e561aef7260ab523abf17d75ccd39ff984 | SQL | zefredz/claroline-packages | /modules/ICEPC/setup/install.sql | UTF-8 | 1,180 | 3.0625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `__CL_MAIN__epc_user_data` (
`user_id` int(11) NOT NULL,
`noma` varchar(12) NOT NULL,
`sigle_anet` varchar(32) NOT NULL,
`other_data` text,
`last_sync` datetime DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS `__CL_MA... | true |
773dd27161852901ea3f82345b7fb688a600c535 | SQL | georgetown-cset/unicorn-topics | /sql/selecting_ai_dimensions_publication_ids_top_organizations.sql | UTF-8 | 1,219 | 3.671875 | 4 | [] | no_license | -- get the ids and a little supplementary data for all the dimensions papers from the top organizations
CREATE OR REPLACE TABLE
project_unicorn.dimensions_publication_ids_top_organizations_052920 AS (
SELECT
-- get all the info we care about for these papers
unicorn.* EXCEPT (Grid_ID),
wos_subject,
ma... | true |
7e28ee5abd7ab937698b44f79adc067a247077df | SQL | yesicanoemi/trascend-bi | /trascend-bi/StoredProcedures/Empleados/Modificar/ModificarEmpleado.sql | UTF-8 | 887 | 3.421875 | 3 | [] | no_license | -- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE ModificarEmpleado
-- Add the parameters for the stored procedure here
@id int,
@nombreEmpleado varchar(... | true |
3200ac68b25fc4ca7f9d980fa4b846a32178c8c5 | SQL | Alexdavv/GeoVocabs | /US Census/US_Census_voc.sql | UTF-8 | 6,146 | 4.0625 | 4 | [] | no_license | -- Creation of divisions temporary table with link to region
DROP TABLE IF EXISTS divisions;
CREATE TABLE divisions
(
gid int,
divisionce varchar(1),
affgeoid varchar(10),
geoid varchar(1),
name varchar(100),
lsad varchar(2),
aland double precision,
awater double precision,
region_code varchar(50)
);
-- Popul... | true |
f5d9b901ff226e878f08f4f29763e006272cd5f1 | SQL | PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS | /dms/pc/pc.t_encrypted_collection_passphrases.sql | UTF-8 | 1,280 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | --
-- Name: t_encrypted_collection_passphrases; Type: TABLE; Schema: pc; Owner: d3l243
--
CREATE TABLE pc.t_encrypted_collection_passphrases (
passphrase_id integer NOT NULL,
passphrase public.citext NOT NULL,
protein_collection_id integer NOT NULL
);
ALTER TABLE pc.t_encrypted_collection_pass... | true |
03eb43cf80b716cffab0aefefd2ad30968771252 | SQL | lishewen/WMS | /docs/初始化文件/清空数据库.sql | UTF-8 | 2,991 | 2.75 | 3 | [
"MIT"
] | permissive | SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE IT_LocalDetail;
TRUNCATE TABLE IT_LocalMaterial;
TRUNCATE TABLE IT_RecordBook;
TRUNCATE TABLE TD_Allocate;
TRUNCATE TABLE TD_AllocateDetail;
TRUNCATE TABLE TD_Bad;
TRUNCATE TABLE TD_BadDetail;
TRUNCATE TABLE TD_Check;
TRUNCATE TABLE TD_CheckArea;
TRUNCATE TABLE TD_CheckData;... | true |
b202b3197aed808e7fa33c8ff0cdc905d384197b | SQL | BerbeceAndrei/CarTrackerDatabase | /car_tracker_DDL.sql | UTF-8 | 3,128 | 3.5 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema my... | true |
35aa0ae83af01c5d4671f3bc8c0e0dc5892d16a2 | SQL | rajeshsaha782/Java-projects | /SuperShop-Project/group_3.sql | UTF-8 | 3,247 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 01, 2017 at 09:33 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.