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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
96d404b420a98935b24f261234ad94e693b74a21 | SQL | PawelZu/mysql-scripts | /seo-zaplecza/add-tag_page-wpmu.sql | UTF-8 | 2,224 | 3.796875 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS add_tag_page_wpmu;
DELIMITER //
CREATE PROCEDURE add_tag_page_wpmu()
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE blogId INT;
DECLARE blogPath VARCHAR(100);
DECLARE blogDomain VARCHAR(100);
declare tag_page_id int;
DECLARE cur1 CURSOR FOR SELECT `blog_id`, `path`, `domain` FRO... | true |
9012145a6a046fdc110d1e74f059f09048b10f49 | SQL | gustiyana/Kelompok4 | /Tugas Besar/Database/javamarketdcc.sql | UTF-8 | 4,324 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 05, 2017 at 10:32
-- Server version: 5.1.41
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET... | true |
bdaff349ca5e39cb9059456064089bd5f8d8f26b | SQL | The-Software-Guild/sql-hotel-schema-kimberlyeslami | /KimberlyEslami-HotelData/KimberlyEslami-HotelData/kimberlyeslamihoteldb_reservations.sql | UTF-8 | 2,577 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: kimberlyeslamihoteldb
-- ------------------------------------------------------
-- Server version 8.0.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... | true |
294928a38bc0a85e77bf0f57a9a4e516a0912d56 | SQL | stukaloav/CService | /ContactService/src/main/resources/schema.sql | UTF-8 | 1,145 | 3.34375 | 3 | [] | no_license | DROP TABLE IF EXISTS CONTACT;
DROP TABLE IF EXISTS HOBBY;
DROP TABLE IF EXISTS PLACE;
DROP TABLE IF EXISTS CONTACT_HOBBIES;
DROP TABLE IF EXISTS FRIENDSHIP;
DROP TABLE IF EXISTS CONTACT_PLACES;
DROP TABLE IF EXISTS MESSAGE;
CREATE TABLE CONTACT (
ID INT NOT NULL AUTO_INCREMENT
, FIRST_NAME VARCHAR(99) NOT ... | true |
f812a9fc23650dee721d20644027f2b224bc355d | SQL | anagh07/job_portal | /queries/db_create.sql | UTF-8 | 6,251 | 3.53125 | 4 | [] | no_license | DROP DATABASE career_portal;
CREATE database career_portal;
USE career_portal;
CREATE TABLE employer (
employer_ID int NOT NULL AUTO_INCREMENT,
first_name varchar(50) NOT NULL,
last_name varchar(50),
emp_specialization varchar(100),
country varchar(50),
phone VARCHAR(50),
email varchar(50) N... | true |
fb6051e55d92afdd8f45160560ee875a2076ca1d | SQL | glensc/eventum | /upgrade/patches/04_isu_order.sql | UTF-8 | 196 | 2.625 | 3 | [] | no_license | ALTER TABLE %TABLE_PREFIX%issue_user ADD isu_order int(11) NOT NULL DEFAULT '0' AFTER isu_assigned_date, ADD INDEX isu_order (isu_order);
UPDATE %TABLE_PREFIX%issue_user set isu_order=isu_iss_id;
| true |
5d4de0aee07a705d535c0ef4a9eded6df8748182 | SQL | apoorvakshirsagar12/Java-Web-Development | /StockAPIEclipse/SQL/mysql.sql | UTF-8 | 7,596 | 2.921875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `my_stock` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `my_stock`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: my_stock
-- ------------------------------------------------------
-- Server version 5.7.20-log
/*!40101 SET @OLD_CHARACTE... | true |
27b2dbb25ccc8398816c35b017df5a833ffd73c3 | SQL | GuilhermeRodriguesSantos/Projeto-Integrador | /Paralelo/Script_paralelo_CREATE.sql | UTF-8 | 358 | 2.859375 | 3 | [] | no_license | CREATE DATABASE teste;
USE teste;
CREATE TABLE tabela (
indice INT AUTO_INCREMENT PRIMARY KEY,
nome_cnpj_endereco TEXT NOT NULL
);
DELETE FROM tabela where id!=0;
INSERT INTO tabela (nome_cnpj_endereco)
VALUES ("Vitor Ribeiro|37324460852|Av Engenheiro Heitor Antonio|555"),
("Rita Ribeiro|1234567890|Itanhaem|1... | true |
e7e730f63bf27e85271a900e563ee2def5631f89 | SQL | CooperNolan/ArticleManager | /src/main/resources/articlemanagement.sql | UTF-8 | 3,467 | 3.875 | 4 | [
"MIT"
] | permissive | create database articlemanagement character set utf8;
use articlemanagement;
CREATE TABLE users (
user_id int(11) NOT NULL AUTO_INCREMENT COMMENT '用户编号',
username varchar(20) NOT NULL unique COMMENT '登录账号',
userpass varchar(20) NOT NULL COMMENT '登录密码',
nickname varchar(20) NOT NULL COMMENT '用户昵称',
birthday v... | true |
22d3ff526dcefb8c17592349e875d9adec3e9807 | SQL | albertomattos/SQL_gerais | /Kit lançado.sql | UTF-8 | 216 | 2.625 | 3 | [] | no_license | select cod_pac, data_mov from famovcad, famovprd
where famovcad.comanda = famovprd.comanda
and codigo = "097785" and cod_pro = "000119" and tipo_pgto = "R" and data_mov >= "01/02/2006"
order by famovprd.comanda desc
| true |
7448b19621ac41afd0244a5a44fae99f937867c2 | SQL | fstanchese/corporativo | /corporativo/sql/Boleto/Boleto_qPesRef.sql | UTF-8 | 234 | 2.84375 | 3 | [] | no_license | select
Boleto.*,
boleto_gnState(Boleto.Id,trunc(sysdate),'CONSIDERAR_QUITADO') as SITUACAO
from
Boleto
where
State_Base_Id <> 3000000000001
and
Referencia = p_Boleto_Referencia
and
WPessoa_Sacado_Id = nvl( p_WPessoa_Id ,0) | true |
044eb3a3abcfafe181aa0d8b1a1662e7fc135323 | SQL | koskoha/Financial-Manager-JavaFX | /src/SQL/create.sql | UTF-8 | 954 | 3.234375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS USERS
(
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
NAME TEXT NOT NULL,
PASSWORD CHAR(32)
);
CREATE TABLE IF NOT EXISTS ACCOUNTS
(
ACCOUNT_ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
BALLANCE INTEGER NOT NULL,
DE... | true |
f1010c4861b7ecb74cff06ecb551707be5f1eaef | SQL | miyako/4d-tips-northwind-traders | /northwindtraders.com.4dbase/SQL/EmployeeTerritories/Table.sql | UTF-8 | 172 | 2.71875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS EmployeeTerritories
(
[EmployeeID] INT32 NOT NULL AUTO_INCREMENT,
[TerritoryID] VARCHAR(20) NOT NULL,
PRIMARY KEY (EmployeeID, TerritoryID)
); | true |
f2e24e25f94062fafd89b3b466bf9b7cd4275189 | SQL | green-fox-academy/LiviaNy | /Week-18/day-2/quiz-app.sql | UTF-8 | 5,147 | 2.96875 | 3 | [] | no_license | CREATE TABLE questions (
id int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
question varchar(255) NOT NULL
);
INSERT INTO questions (id, question) VALUES
(1, 'Who made bubblegum flavored brokkoli?'),
(2, 'What colour the firt orange had?'),
(3, 'Which one letter doesn`t appear in any U.S. state name?'),
(4, 'How many... | true |
e41990efc5b8330ec85f690e0a119cf4462edf55 | SQL | gidor/dxfetl | /sql/no_condotte.sql | UTF-8 | 2,600 | 3.875 | 4 | [] | no_license | SELECT
INI.X AS "X",
INI.Y AS "Y",
FIN.X AS "X1",
FIN.Y AS "Y1",
((INI.Z - (INI.FONTUBO / 100)) - (FIN.Z - (FIN.FONTUBO / 100))) as "DH",
INI.OBJECTID & '-' & FIN.OBJECTID AS "OBJ_ID",
INI.ISTAT_ID as "ISTAT_ID",
INI.CODE as "CODE",
INI.OBJECTID as "IDPUNINI",
FIN.OBJECTID as "IDPUNFIN",
'' as "... | true |
06be5a99d373f6772d7673859e6406b7b598cf5f | SQL | SharrarKhan/Pursuit-Core-Web-Unit-3-Assessment | /db/seed.sql | UTF-8 | 1,968 | 3.65625 | 4 | [] | no_license | DROP DATABASE IF EXISTS seed;
CREATE DATABASE seed;
\c seed;
CREATE TABLE researchers (
id SERIAL PRIMARY KEY,
researchers_name VARCHAR,
job_title VARCHAR
);
CREATE TABLE species (
id SERIAL PRIMARY KEY,
species_name VARCHAR,
is_mammal BOOLEAN
);
CREATE TABLE animals (
id SERIAL PRIMARY ... | true |
56ba783631432553716291cf72aa0d92cd7b92a8 | SQL | Flavia-OlSi/SENAI-Segundo.Semestre | /SENAI-Sprint.1-BD/Desafio - RPG/hroads_01_DML.sql | ISO-8859-1 | 1,566 | 3.28125 | 3 | [] | no_license | -- Selecionando o banco de dados
USE SENAI_HROADS_MANHA;
-- Inserindo dados na tabela Tipo
INSERT INTO TiposDeHabilidades (Nome)
VALUES ('Ataque'),
('Defesa'),
('Cura'),
('Magia');
-- Inserindo dados na tabela Habilidades
INSERT INTO Habilidades (Nome, idTipoDeHabilidade)
VALUES ('La... | true |
49caaac79feb8538f6ecab298bb32dde548140bf | SQL | bhupendpatil/Practice | /Database/PL SQL/activeDatabase.sql | UTF-8 | 2,723 | 4.21875 | 4 | [
"MIT"
] | permissive | -- Active Database
-- Create table bunty(eno;ename;hrs;pno;super_no)
-- Create table kantekar(pname;pno;thrs;head_no)
-- Insert 5 tuples and write triggers to do the following:
-- a)Creating a trigger to insert new employee tuple and display the new total hours from project table.
-- b)Creating a trigger to change t... | true |
4d16653e192ad67f35f6d1bbba0a31144c2073b8 | SQL | dongguiyan/android | /book/Book/src/main/webapp/db/book.sql | UTF-8 | 14,504 | 3.15625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MySQL
Source Server Version : 50528
Source Host : localhost:3306
Source Database : mcy_book
Target Server Type : MYSQL
Target Server Version : 50528
File Encoding : 65001
Date: 2019-09-20 14:03:16
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
5e13c3d2171aa78c15e3dea619d47b8446697baa | SQL | myunghakLee/PC_Post_System | /Seat Schema&Data.sql | UTF-8 | 960 | 2.59375 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS `SEAT` DEFAULT CHARACTER SET utf8 ;
use Seat;
-- -----------------------------------------------------
-- Table `Seat`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Seat`.`Seat` (
`Seat_ID` INT NOT NULL,
`IS_empty` INT NOT NULL,
`reamain_time` Tim... | true |
1939d41a959884b6735ca9a4859760fbc8ccd0a8 | SQL | eduardomtz1984/frontendpractica | /firstdb.sql | UTF-8 | 2,331 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 13, 2016 at 11:01 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.5.30
CREATE DATABASE firstdb;
USE firstdb;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
5c721c9c7d38a8f9f0f19bac5b1c10dab9862598 | SQL | kyriejoshua/learn-sql | /Sample/Ch06/PRACTICE.sql | UTF-8 | 791 | 3.765625 | 4 | [] | no_license | -- 第六章练习题
-- 6.1
-- ①得到进货价格不再 500, 2800, 5000 的商品名称和进货价格
-- ②得到和上面一样的数据 ❌
-- ②无法得到任何结果,NOT IN 的陷阱,不可以在其中加入 NULL
-- 6.2
-- ❌
SELECT sale_price
SUM(CASE WHEN sale_price < 1000 THEN sale_price ELSE 0 END) AS low_price
SUM(CASE WHEN sale_price > 1000 AND sale_price < 3000 THEN sale_price ELSE 0 END) AS mid_price
S... | true |
bde7915e26514dd8815bd5e71ea16b34337cee88 | SQL | jeevi/SocialNetworkingWebsite | /.sql files/preferences.sql | UTF-8 | 181 | 2.859375 | 3 | [] | no_license | CREATE TABLE CSETEAM61.PREFERENCES(
USERID VARCHAR(20) NOT NULL,
USERLIKES VARCHAR(20) NOT NULL,
UNIQUE(USERID, USERLIKES),
FOREIGN KEY(USERID) REFERENCES CSETEAM61.USERS(USERID)
); | true |
34cd35deeacb1ce939b94c2066deb83097257ede | SQL | PabloOssola/M4Trader-M4Trader-V0.1 | /MonedasDB/orden_owner/Stored Procedures/NOV_ObtenerEstadoNovedad.sql | UTF-8 | 308 | 2.578125 | 3 | [] | no_license | CREATE PROCEDURE [orden_owner].[NOV_ObtenerEstadoNovedad]
@IdNovedadDeTransferencia int,
@IdEstado int output
AS
BEGIN
SET NOCOUNT ON
SELECT @IdEstado = IdEstado
from orden_owner.NovedadesDeTransferencias
where IdNovedadTransferenciaFondo = @IdNovedadDeTransferencia
END | true |
75dce80e0162f9a92c6092729bcfaae927d5fce5 | SQL | brendan-mcgrady/ruby_project | /db/spending_tracker.sql | UTF-8 | 410 | 3.234375 | 3 | [] | no_license | DROP TABLE IF EXISTS transactions;
DROP TABLE IF EXISTS merchants;
DROP TABLE IF EXISTS tags;
CREATE TABLE tags(
id SERIAL PRIMARY KEY,
name VARCHAR
);
CREATE TABLE merchants(
id SERIAL PRIMARY KEY,
name VARCHAR(50)
);
CREATE TABLE transactions(
id SERIAL PRIMARY KEY,
merchant_id INT REFERENCES merchants... | true |
21330e48d4fcc05f3603d9816aa1963472ef41ac | SQL | LaluAtasaldi/UTS_Semester5 | /kurniawan wijaya/kurniawan.sql | UTF-8 | 7,745 | 2.953125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 01, 2018 at 02:14 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
ad5de1ae8685128a12bb7d7562dcea0827023155 | SQL | goatking91/ecobay | /ecobay/src/main/webapp/resources/db/ecobay_CREATE TABLE.sql | UTF-8 | 7,127 | 3.515625 | 4 | [] | no_license | -- 회원
CREATE TABLE MEMBER
(
MEMBER_ID VARCHAR(100) NOT NULL PRIMARY KEY
, MEMBER_NAME VARCHAR(100) NOT NULL
, PWD VARCHAR(500) NOT NULL
, BIRTH VARCHAR(20) NOT NULL
, ZIPCODE VARCHAR(10) NOT NULL
, ADDR1 VARCHAR(500) NOT NULL
, ADDR2 VARCHAR(500) NOT NULL
, GENDER VARCHAR(5) NOT NULL default 'M'
, PHONE VAR... | true |
e13e2dfe1fe9713fcaa70038b5c2e2c09cecc33f | SQL | radtek/abs3 | /sql/mmfo/bars/Table/sv_opruch_rel.sql | WINDOWS-1251 | 3,564 | 3.0625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/SV_OPRUCH_REL.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
f3707461544fc92571477a60dfcffe61dd44b242 | SQL | Subham-Yadav/Interview-Preparation | /query.sql | UTF-8 | 1,658 | 3.203125 | 3 | [] | no_license | CREATE TABLE HR(id SERIAL, question TEXT);
INSERT INTO HR(question) VALUES ('Tell me about yourself.'),
('What motivates you?'),
('How do you evaluate success?'),
('What has been the greatest disappointment in your life?'),
('What do people most often criticize about you?'),
('What is your greatest weakness?'),
... | true |
939841258afa81704ded8ba967b99af7c51e7b83 | SQL | endahlaksmita/tugas-komputasiawan | /web/db/warteg.sql | UTF-8 | 1,243 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.2deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 01, 2012 at 03:57 AM
-- Server version: 5.1.41
-- PHP Version: 5.3.2-1ubuntu4.18
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... | true |
07f9f7aa211f857d80b4b646459c5e6cb4e4670a | SQL | gladiopeace/digital-data-syn | /documents/oms/TB_MEDBB.sql | GB18030 | 2,014 | 3.25 | 3 | [] | no_license | /*
================================================================================
ṹ:TB_MEDBB
ṹ:ý۸
ṹĿ:
================================================================================
*/
drop sequence SEQ_TB_MEDBB;
drop index AK_TB_MEDBB;
drop table TB_MEDBB;
create table TB_MEDBB (
MEDBB_ID INTEGER ... | true |
e4b3201417ea653645d45ff67355dfd64e7057bf | SQL | anvesh649/mysql | /Mysql_topics/joins.sql | UTF-8 | 5,740 | 4.0625 | 4 | [] | no_license | select order_id,o.customer_id from orders o join customers c on o.customer_id=c.customer_id;
select * from order_items;
select * from products;
select order_id,o.product_id,p.name,quantity,o.unit_price from order_items o join products p on o.product_id=p.product_id;
select * from order_items oi join sql_i... | true |
ae949c75260c0d4aa64a414704c69c1cf9b13d17 | SQL | sbj1234567892010/MiniSQL | /data.sql | UTF-8 | 1,258 | 3.5625 | 4 | [] | no_license |
create table student (
sno char(8),
sname char(16) unique,
sage int,
sgender char (1),
primary key ( sage )
);
create index index1 on student (sno);
create index index1 on student (sname);
create index index2 on student (sname);
drop index index2 on student;
insert into student values ('123456','a',27,'F');
inser... | true |
1f9ab7091cae5d5029c8284000763ecc0edcfbaa | SQL | rubensantibanezacosta/Common_ionic_Project | /backend/import.sql | UTF-8 | 6,167 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 13-10-2021 a las 11:24:30
-- Versión del servidor: 8.0.26-0ubuntu0.20.04.3
-- Versión de PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_... | true |
b42cc4501e6f1cc3e44a2b49acecb33928c599dc | SQL | lbz320/Stanford-DB-Class-Exercises-and-Notes | /DB11_Constraints_and_Triggers/Q6.sql | UTF-8 | 547 | 3.8125 | 4 | [] | no_license | --Q6
--Write a trigger to enforce the following behavior: If A liked B but is updated to A liking C instead, and B and C were friends, make B and C no longer friends. Don't forget to delete the friendship in both directions, and make sure the trigger only runs when the "liked" (ID2) person is changed but the "liking" (... | true |
c230c1204b17e77104f51b4b8a1efcbb525cd983 | SQL | VineetkumarPatil/docker_examples | /PostgreSQL/scripts/postgis_tables.sql | UTF-8 | 1,231 | 3.140625 | 3 | [] | no_license |
SET temp_file_limit = 37050832 ;
CREATE USER test;
CREATE DATABASE postgres WITH OWNER postgres;
GRANT ALL PRIVILEGES ON DATABASE postgres TO postgres,test,docker;
\connect postgres;
SET temp_file_limit = 37050832 ;
CREATE EXTENSION postgis VERSION "2.3.3";
-- CREATE EXTENSION postgis_raster VERSION "2.3.3"... | true |
a9d8668ecbb6ccefa0a4a3a526c81af93ff80a50 | SQL | ddboline/garmin_rust | /migrations/V15__ids_integer_to_uuid.sql | UTF-8 | 5,100 | 3.421875 | 3 | [
"MIT"
] | permissive | CREATE EXTENSION IF NOT EXISTS pgcrypto;
ALTER TABLE garmin_corrections_laps DROP COLUMN id;
ALTER TABLE garmin_corrections_laps ADD COLUMN id UUID PRIMARY KEY NOT NULL DEFAULT gen_random_uuid();
ALTER TABLE scale_measurements DROP COLUMN id;
ALTER TABLE scale_measurements ADD COLUMN id UUID PRIMARY KEY NOT NULL DEFA... | true |
3e8db767f88e5a35bc7451a6605eff518a7f4a02 | SQL | e2simplon/immobourse | /immobourse.sql | UTF-8 | 12,140 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Lun 18 Décembre 2017 à 16:24
-- Version du serveur : 5.7.20-0ubuntu0.16.04.1
-- Version de PHP : 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!4... | true |
710cf976ee948faad652174e5d2cdece4af04ac6 | SQL | NebelGG/-coursework_mysql | /socialview.sql | UTF-8 | 31,862 | 4.15625 | 4 | [] | no_license | DROP DATABASE IF EXISTS socialview;
CREATE DATABASE socialview;
USE socialview;
-- ----------------------------------- GENERAL INFO
DROP TABLE IF EXISTS companies;
CREATE TABLE companies (
id SERIAL PRIMARY KEY,
company VARCHAR(200) UNIQUE NOT NULL
);
DROP TABLE IF EXISTS countries;
CREATE TABLE countries (
id SE... | true |
8734415ab881c88c1d4fb8a0ec135ba5db0b6a48 | SQL | omeryounus/Oracle-SQL-Queries | /HCM/12-Cuestionarios/12.2-Parametros/LoVPersonName.sql | UTF-8 | 3,369 | 3.796875 | 4 | [] | no_license | --Oara hacer esta LoV lo que hice fue ver el WHERE de 1-Empleados_Y_Tareas_Y_Cuestionarios y puse todos esos filtros...
--de esta manera me aseguro que me traiga a los assignment number que se ven ahi (NO a tooodos los demás).
SELECT
distinct
PPNF.FULL_NAME, --Lo que muestro.
PERA.PERSON_ID --Por lo qu... | true |
28aeae779dd0f7d383f401c328a329e327c3c2ec | SQL | santiago1393/OraclePLCode | /PLSQLUtilities.sql | UTF-8 | 945 | 2.671875 | 3 | [] | no_license |
/* Create Oracle JOB */
begin
sys.dbms_scheduler.create_job(job_name => 'JOB_NAME',
job_type => 'STORED_PROCEDURE',
job_action => 'PROCEDURE_NAME',
start_date => to_date('14-0... | true |
d1d8a5d8d83a137f1adf9c91b75769885d4cca74 | SQL | rnmoge/cards-learner | /Scripts/Create/CreateCategory.sql | UTF-8 | 320 | 2.703125 | 3 | [] | no_license | Begin Transaction;
Create TABLE MAIN.[Temp_807483443](
[ID] int UNIQUE
,[Name] varchar
, Primary Key(ID)
);
Insert Into MAIN.[Temp_807483443] ([ID],[Name])
Select [ID],[Name] From MAIN.[Category];
Drop Table MAIN.[Category];
Alter Table MAIN.[Temp_807483443] Rename To [Category];
Commit Transaction; | true |
197f23ee782c19717c7c0eff4db403daf13d4247 | SQL | ShivrajMohite/ImportData_Excel_To_MySQL | /Database/tbl_excel.sql | UTF-8 | 2,057 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 11, 2018 at 10:18 AM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
c66f4448e88438a431f432ae0bffaea836735356 | SQL | fflch/dados | /Queries/conta_convenios_fin.sql | UTF-8 | 83 | 2.5625 | 3 | [] | no_license | SELECT COUNT(DISTINCT codcvn) from CONVENIO where dtadtvcvn = NULL AND stafin = 'S' | true |
f7f2521bb22b229c261f85a9f7fc029f3c336ad6 | SQL | neil-marcellini/Ideate | /Ideate_SQL/stored_procedures/sp_next_iteration.sql | UTF-8 | 885 | 4.3125 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS sp_next_iteration;
/* Create a new potential linked to the given iteration */
delimiter //
CREATE PROCEDURE sp_next_iteration(idea_id INT, iteration_num int)
BEGIN
-- get the id of the iteration with the given idea and iteration_num
set @iteration_id = (
select Iteration.iteration_id
fr... | true |
eab90ae774f21c052e2329dc877ff85969039e22 | SQL | shanyl2400/xg | /schema/migrate_2020_10_08.sql | UTF-8 | 405 | 2.65625 | 3 | [] | no_license | -- 新增角色
INSERT INTO auths (`id`, `name`) values (13,"管理本机构信息");
INSERT INTO roles (`id`, `name`, `created_at`, `updated_at`) values (8,"高级机构账号", now(), now());
insert into role_auths (role_id, auth_id) values(8, 6), (8, 13);
-- 增加机构支持角色
UPDATE orgs SET support_role_ids = "1,2,3,4,5,6" WHERE id = 1;
UPDATE orgs SET supp... | true |
579301e5a9f922413e757a2b64879816427cfab4 | SQL | betoben007/member_old | /src/main/resources/sql/world.sql | UTF-8 | 3,290 | 3.96875 | 4 | [] | no_license | select * from emp;
select * from dept;
select count(*) from city; -- totalItem
select * from country;
select * from countrylanguage;
select * from city where countrycode=null
'KOR 의 City' 정보를 출력하세요
select IndepYear,HeadOfState,Population from country where Code = 'KOR';
-- char(10) 255max
-- varchar(10) 255max
-- ... | true |
fae76ce2a95cd99d77614dcaee9cd9d8849fba34 | SQL | yenanfei/j2ee | /jwch4/db.sql | UTF-8 | 527 | 2.671875 | 3 | [] | no_license | create database if not exists `db_jwdb`;
USE `db_jwdb`;
CREATE TABLE `tb_student`(
`no` int NOT NULL auto_increment,
`name` varchar(40) NOT null,
`OS` int NOT null,
`PC` int NOT null,
`DS` int NOT null,
PRIMARY KEY (`no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_mes... | true |
71cfc7637e3050ac072fc07b68c0ef895ec05183 | SQL | jsb5589/JAVAStudy | /EZJava/DBMS/SCOTT/SCOTT~8-WHERE-NULL.sql | UHC | 1,318 | 4.09375 | 4 | [] | no_license | --NULL ó
-- ִ
-- ʴ
--NULL ϸ NULL ȴ.
--ҵ: sal*12
SELECT ename, sal, sal*12 as annsal, comm FROM emp;
--Ѽҵ: sal*12+ comm
SELECT ename, sal, sal*12+comm as annsal, comm FROM emp;
--comm nullΰ
SELECT * FROM emp WHERE comm = NULL; -- ڷᰡ ˻
SELECT * FROM emp WHERE comm IS NULL; -- ڷᰡ ˻
--comm null ƴ
SELECT * FROM... | true |
0aecd9e6557bf5ce93f396c54fe85af585b36073 | SQL | fecyberid/oricert | /db/oricert.sql | UTF-8 | 5,517 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2019 at 10:50 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
25cc917e32b20d1ae7bda141c6e8b3aa593d7378 | SQL | v3551G/Mimic_III | /Exploration/queries.sql | UTF-8 | 856 | 3.703125 | 4 | [] | no_license | set search_path to mimiciii;
#### ICU Stay View Exploration ####
select * from icustay_detail limit 10;
select distinct subject_id, count(*) as cnt
from icustay_detail
group by subject_id
order by cnt desc;
select * from icustay_detail where subject_id = 13033;
#### labs_agg
select * from lab_aggs limit 10;
##... | true |
3d69c7c42b3f5529c0cc284628a8166f05f4acb5 | SQL | PogadaevEA/takeaway | /user-service/src/main/resources/db/changelog/2021.01.27_create_dish_restaurant_category.sql | UTF-8 | 520 | 3.34375 | 3 | [] | no_license | --liquibase formatted sql
--changeset Egor Pogadaev:1
drop table if exists dish_restaurant_categories cascade;
create table dish_restaurant_categories (
dish_id bigint not null,
restaurant_id bigint not null,
category_id varchar(25) not null,
constraint t_drc_dish_id_fkey foreign key (dish_id) referen... | true |
1bf8d863de8da3613ae40f0f1a0c84b7e096ef36 | SQL | asyed9394/Employee_DataAnalysis | /Queries/Rec_07_Stu_Joins_query.sql | UTF-8 | 517 | 3.578125 | 4 | [] | no_license | -- First check the data
SELECT * FROM players LIMIT 10;
SELECT * FROM seasons_stats LIMIT 10;
-- Join players with seasons_stats
SELECT
p.id,
p.player,
p.height,
p.weight,
p.college,
p.born,
s.position,
s.tm
FROM players as p
JOIN seasons_stats as s
on p.id = s.player_id;
-- Join seasons_stats with pla... | true |
8fcf1149d254bffa3853775f4e6a4877ef2930a7 | SQL | deydrums/master-php | /aprendiendo-sql/09-ejercicios/ejercicio24.sql | UTF-8 | 330 | 3.75 | 4 | [] | no_license | /*
24. Listar los encargos con el nombre del coche, el nombre del cliente y
el nombre de la ciudad, pero unicamente cuando sean de barcelona
*/
SELECT e.id, co.modelo, c.nombre AS 'Cliente',c.ciudad FROM encargos e
INNER JOIN clientes c ON c.id = e.cliente_id
INNER JOIN coches co ON co.id = e.coche_id
WHERE ciudad = 'B... | true |
b4dd24ab059ddbd3685b38d97d1dfc51ec4cc555 | SQL | Trishachi/cohort3 | /src/sql/Exercises/Exercises.sql | UTF-8 | 1,290 | 3.734375 | 4 | [] | no_license | /*GROUP BY Challenges */
SELECT staff_id, COUNT(amount), SUM(amount)
FROM payment
GROUP BY staff_id;
SELECT customer_id, SUM(amount)
FROM payment
GROUP BY customer_id
ORDER BY sum(amount) DESC
LIMIT 5;
/*HAVING Challenges */
SELECT customer_id, COUNT(amount)
FROM payment
GROUP BY customer_id
HAVING COUNT(amount) >= 4... | true |
c1a4a8aa6116bc5c92f44a6dcafd833c5461053a | SQL | crystalatk/jumble_back | /schema.sql | UTF-8 | 542 | 2.890625 | 3 | [] | no_license | CREATE TABLE users (
id serial PRIMARY KEY,
username varchar(20),
password varchar (200),
first_name varchar (100),
last_name varchar (100),
zip_code integer,
phone_num text,
picture text
);
CREATE TABLE favorites (
id serial PRIMARY KEY,
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP... | true |
693fc0a4bee1f31694b2c011e54fffe9d0130d24 | SQL | SJSU272LabS17/Project-Team-15 | /HM_db_schema/HM_geekEvents.sql | WINDOWS-1252 | 6,408 | 2.96875 | 3 | [] | no_license |
DROP TABLE IF EXISTS `events`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `events` (
`EventId` int(20) NOT NULL AUTO_INCREMENT,
`EventName` varchar(500) DEFAULT NULL,
`EventDescription` varchar(1000) DEFAULT NULL,
`EventType` varchar... | true |
dfc1d3e106eef208abb36946eb8b8df697f2911f | SQL | nikolovkiril/SoftUni | /SQL/Databases MS SQL-Server/Indices and Data Aggregation/07. Deposits Filter.sql | UTF-8 | 197 | 2.875 | 3 | [] | no_license | SELECT DepositGroup , SUM(DepositAmount) AS TotalSum FROM WizzardDeposits
WHERE MagicWandCreator LIKE '%Ollivander%'
GROUP BY DepositGroup
HAVING SUM(DepositAmount) < 150000
ORDER BY TotalSum DESC | true |
5a0ab1d6f8a81c0c099c0cb781ddc2b39e121809 | SQL | evolentDelight/UC-Merced | /CSE111 - Database Systems/Lab03/8.sql | UTF-8 | 191 | 3.3125 | 3 | [] | no_license | select s_name
from supplier natural join nation natural join region
where r_regionkey = n_regionkey AND n_nationkey = s_nationkey AND r_name = 'ASIA' AND s_acctbal < 10000
order by s_name asc | true |
23b148ab7f678f4e0ba7cfc5313a1676032f000c | SQL | mbougie/gibbs | /projects/lem/projects/main/sql/v3/v3_2/block/final/v3_2.block_final_core.sql | UTF-8 | 646 | 3.328125 | 3 | [] | no_license | ----Description: create table that ONLY contains the non-null values in the nwalt_rc column and are not equal to 11 in nwalt column in block_main table
----NOTE this table is getting the majority
----Query returned successfully: 10122499 rows affected, 691541 ms execution time.
CREATE TABLE v3_2.block_core as
SELE... | true |
06348e8561fe2268396a78d3a0074794ad5c3284 | SQL | SeoK106/SMWU_2020-1_DBProgramming_project | /sql/InsertBook_res.sql | UTF-8 | 952 | 3.78125 | 4 | [] | no_license | CREATE PROCEDURE InsertBook_res(
bId IN books.b_id%type,
sId IN students.s_id%type,
result OUT VARCHAR2
)
IS
duplicate_reserve EXCEPTION;
nBooks NUMBER;
rBooks NUMBER;
nReserv NUMBER;
BEGIN
result:='temp';
nReserv:=0;
/*에러 처리2: 이미 자신이 예약한 책에 대해 다시 예약하려고 하는 경우 -> 예약하는 경우에만 확인*/
SELECT COUNT(s_id) INTO... | true |
952dd8f5861e30d9e22346fe52ab1947a7eb5ef4 | SQL | myxland/zishan-admin-java | /src/main/resources/sql/11-15+nx_detection_template+何敏.sql | UTF-8 | 1,672 | 3.328125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : ddwb
Source Server Type : MySQL
Source Server Version : 80016
Source Host : localhost:3306
Source Schema : zishan
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001
Date: 13/11/2019 10:07:20... | true |
ebe7ad4ba32f4f2fac96e85da6fdca9416c1ebe3 | SQL | HannahDilley/SQL-Queries | /12 Top 5 Customers in Top Ten Cities using CTE.sql | UTF-8 | 1,825 | 4.53125 | 5 | [] | no_license | WITH top_ten_countries (country)
AS
( /*Top Ten Countries*/
SELECT
country.country,
count(country.country) AS country_count
FROM customer
INNER JOIN address ON customer.address_id = address.address_id
INNER JOIN city ON address.city_id = city.city_id
INNER JOIN country ON city.country_id = country... | true |
f089bef9d0ab5ae8f30127e0ea3dc9bd8a372c16 | SQL | lickey10/u_CrimeMapper | /CrimeMapper/Assets/GeoArcMap/ServerFiles/Database/www/geoarcmap_db.sql | UTF-8 | 7,918 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.6
-- http://www.phpmyadmin.net
--
-- Host: mysql1.paris1.alwaysdata.com
-- Generation Time: Jan 02, 2017 at 04:12 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
8d1145ac770f7958d6556792f4b21e817c6d0433 | SQL | TheRealBilal/sighal | /applimedical/sighal/mdd/creation/createTables.sql | UTF-8 | 18,371 | 2.84375 | 3 | [] | no_license | drop table if exists BonEntree;
drop table if exists Categorie;
drop table if exists Command;
drop table if exists DossierPatient;
drop table if exists FichePatient;
drop table if exists FichePatientDentaire;
drop table if exists FichePatientGenerale;
drop table if exists Fonction;
drop table if... | true |
d25c24061f4f4c75f26cb22381be4f19128a082f | SQL | murphyAk/TechJobsPersistent | /TechJobsPersistent/queries.sql | UTF-8 | 419 | 4.15625 | 4 | [] | no_license | --Part 1
SELECT COLUMN_NAME, DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = 'jobs';
--Part 2
SELECT Name, Location
FROM employers
WHERE Location = "St. Louis City";
--Part 3
SELECT skills.Name AS "Skill name", skills.Description, jobs.Name AS "Job name"
FROM skills
INNER JOIN jobskills ON Skills.Id... | true |
3917c81cb9d892273c8c9a1b0531171e467bb630 | SQL | amirizad/healthepetz | /db/schema.sql | UTF-8 | 3,050 | 3.484375 | 3 | [] | no_license | create database healthepetz_db;
use healthepetz_db;
create table users (
id integer(11) auto_increment not null,
username varchar(255) not null,
email varchar(255) not null,
password varchar(20) not null,
role varchar(255) not null default 'user',
createdAt timestamp not null,
updatedAt timestamp not null,
primary key... | true |
a9eb0331b8d0847e7483abc64254735b4c58bb51 | SQL | JulioFonseca/Laravel_teste_pratico | /banco de dados/bd_sistema-crud.sql | UTF-8 | 2,893 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 15-Mar-2021 às 19:06
-- Versão do servidor: 10.4.17-MariaDB
-- versão do PHP: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
e07499dcfb611243480a5fc0a08f8cb723a14632 | SQL | devaraujstein/Hotel-System | /Scripts/BancoHotel2.sql | UTF-8 | 3,968 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Mon Jun 4 15:55:57 2018
-- Model: New Model Version: 1.0
-- 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='TR... | true |
98d791fddd529314704a3b214b4231bc3c54a207 | SQL | rochamp2540/Scan-Tracking | /127_0_0_1.sql | UTF-8 | 2,116 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 28, 2020 at 01:12 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
d07a1ef3e3616f624dd85538b37e3d0e3956cec9 | SQL | xittz/PlayREST | /conf/evolutions/default/1.sql | UTF-8 | 540 | 2.9375 | 3 | [
"CC0-1.0"
] | permissive | # --- !Ups
create table "users" (
"id" bigint generated by default as identity(start with 1) not null primary key,
"username" varchar not null,
"password" varchar not null,
"is_deleted" bit not null
);
insert into "users" ("username", "password", "is_deleted") values ('xittz', '1234', 0);
insert into "users" ... | true |
8f3d618237b8cb2e7a3f4a7601e4c25ab2277af6 | SQL | mk374/JustForPlay | /insertstatements.sql | UTF-8 | 6,076 | 2.9375 | 3 | [] | no_license | --populating sample zip_code
-- populating sample users; number uids represent emails for now
insert into ruser values('0', 'Animated Andy', 'password123', 'I talk a lot, and really fast', 27708);
insert into ruser values('1', 'Ballistic Ben', 'password124', 'I am libertarian!', 27708);
insert into ruser values('... | true |
7b3158bdf9fef819352630c02c076b7ecb1bf1d4 | SQL | mrandybu/altrepo-server | /sql.d/wds/get_all_filtred_pkgs_with_deps.sql | UTF-8 | 302 | 2.96875 | 3 | [] | no_license | SELECT DISTINCT pkgname,
arrayFilter(x -> (x != pkgname
AND notEmpty(x)), groupUniqArray(reqname)) AS arr
FROM package_dependency
WHERE reqname IN
(SELECT ''
UNION ALL SELECT pkgname
FROM package_dependency)
GROUP BY pkgname
ORDER BY arr
| true |
91e830c1f714303b57ed77b1d2f8e9510b84be8e | SQL | alfa000/cnn | /inventory.sql | UTF-8 | 5,229 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 13, 2018 at 06:41 AM
-- 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 |
08123f431431dc43b883a19aa9ec7a56d6408c32 | SQL | ahsantarique/PL-SQL | /1205021.sql | UTF-8 | 2,818 | 4.28125 | 4 | [] | no_license | --offline 1
Set serveroutput on
DECLARE
MX NUMBER := -1;
MXYEAR NUMBER;
TYPE MONTHNAME IS VARRAY(12) OF VARCHAR2(3);
TYPE MONTHNUM IS VARRAY(12) OF NUMBER;
MN MONTHNAME;
MC MONTHNUM;
CURSOR C1 IS SELECT JOINYEAR, COUNT(*) CNT FROM (SELECT EXTRACT(YEAR FROM HIRE_DATE) AS JOINYEAR FROM EMPLOYEES) GROUP BY JOINYEAR... | true |
3476320d52e5a6581dab4f0a0a21464bc87b9b62 | SQL | pearlisme/spring-boot-jsf-javaconfig | /src/main/resources/schema.sql | UTF-8 | 542 | 3.234375 | 3 | [] | no_license | /*
create table product (
id INTEGER NOT NULL AUTO_INCREMENT,
-- id identity not null,
name varchar (255) not null,
price double not null
);*/
drop table IF EXISTS country;
drop table IF EXISTS product;
CREATE TABLE country (
id INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR(128) NOT NULL,
PRIMARY ... | true |
3f35edcda1490801be2829c03b24ec0eb33b3fd3 | SQL | sun142725/myapp | /server-node/database.sql | UTF-8 | 11,436 | 2.65625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : locaohost
Source Server Version : 50726
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2019-08-19 17:34:34
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
db314cbc9692a280533a3f9984b45a337846cd7a | SQL | samlin0508/ust-demo-api | /ust-demo-api/SQL/create-schema.sql | UTF-8 | 463 | 2.578125 | 3 | [] | no_license | CREATE DATABASE `ust-demo` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
CREATE TABLE `reminder` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`summary` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL,
`description` longtext COLLATE utf8_unicode_ci,
`createDate` datetime DEFAULT CURRENT_TIMESTAM... | true |
b4cb925b000688a09f176017ae1f34c85cea4c19 | SQL | ikechavie/Car-Repo | /Assignment 4/Q4.sql | UTF-8 | 155 | 3.28125 | 3 | [] | no_license | WITH VTypeCount AS
(SELECT VehicleID, VehicleType
FROM Vehicle)
SELECT VehicleType, COUNT(*) AS VehicleTotalByID
FROM VTypeCount
GROUP BY VehicleType; | true |
e1cc271027d33a3ecd9dc79814cf5f671f94021f | SQL | CUBRID/cubrid-testcases | /sql/_06_manipulation/_01_select/_006_group_by/cases/1022.sql | UTF-8 | 1,395 | 3.796875 | 4 | [
"BSD-3-Clause"
] | permissive | --Test group by in range partition class
create class test (
testno char(10) not null,
testname varchar(20) not null,
deptname varchar(20),
testdate date, primary key(testdate)
)
partition by range (extract (year from testdate)) (
partition h2000 values less than (2000),
partit... | true |
52a13abcccb6765694091095e7b27f77ce560ff7 | SQL | YunoTeru/Vote | /vote.sql | UTF-8 | 2,143 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 24, 2019 at 09:50 AM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `vote`
--
-- -------------------------------... | true |
463305e088095ccb611409f8ff328318ddb175f3 | SQL | DS-Felipe-Jacinto/BD-2021 | /Revisão - BD (09-09-2021)/Arquivos (.sql)/bdRevisao.sql | UTF-8 | 1,356 | 4.1875 | 4 | [] | no_license | CREATE DATABASE bdRevisao /* Criando uma base de dados */
USE bdRevisao /* Indicando o banco de dados a ser usado */
/* Criando a tabela para armazenamento dos dados dos Cliente */
CREATE TABLE tbl_Cliente(
Codigo INT PRIMARY KEY IDENTITY (1,1)
,Nome VARCHAR (50)
,dataNascimento DATE
);
CREATE TABLE tbl_Te... | true |
7bd3fd8638260e8f6fe933c63918d87f50887ac9 | SQL | olpbruno/desafiofinal-academy | /models/staging/stg_personcreditcard.sql | UTF-8 | 392 | 3.421875 | 3 | [] | no_license | with source_data as (
select
creditcardid as id_cartao,
businessentityid as id_pessoa
from {{ source('adventure_works','personcreditcard') }}
),
source_with_sk as(
select *
, {{ dbt_utils.surrogate_key(['id_cartao']) }} as sk_cartao
, {{ dbt_utils.surrogate_key(['id_pessoa'... | true |
0eb137cdee020b63d89b7902a06d3eee48123858 | SQL | zhangcy11/zcytest | /select.sql | UTF-8 | 2,560 | 4.875 | 5 | [] | no_license | # 1.查询同时存在1课程和2课程的情况
SELECT C1.studentid, C3.name, C3.age, C3.sex, C1.score AS score1,
C2.score AS score2
FROM (SELECT * FROM student_course WHERE courseid = 1) AS C1
inner JOIN (SELECT * FROM student_course WHERE courseid = 2) AS C2
ON C1.studentid = C2.studentid
inner JOIN student AS C3
ON C1.... | true |
1abf9870424761172f66d930312394718fb3bca7 | SQL | santhoshar90/HexAssignment-BackEnd | /Hex-Assignment/DbScripts/TableScript.sql | UTF-8 | 697 | 3.671875 | 4 | [] | no_license | --Creating DB
CREATE DATABASE [Hex-DB]
----Creating Table USER_MASTER
CREATE TABLE USER_MASTER
(
ID INT Primary KEY IDENTITY(1,1),
Email nvarchar(127) not null,
[Password] nvarchar(127) not null
)
----Creating Table SOFTSKILL_AREA
CREATE TABLE SOFTSKILL_AREA
(
ID INT Primary KEY IDENTITY(1,1),
SkillSet nvarchar(63) n... | true |
f3957de86cce911120c2ff4e77b2e9a9250bde25 | SQL | papesdiop/BusFloatingData | /commons/src/main/resources/create_tables.cql | UTF-8 | 1,664 | 3.90625 | 4 | [
"Apache-2.0"
] | permissive | CREATE KEYSPACE IF NOT EXISTS streaming WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'};
CREATE TABLE IF NOT EXISTS streaming.routeInfos (
id text,
display_name text,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS streaming.vehicles (
id text,
time timestamp,
longitud... | true |
c871bc82c774473683166473824abb45558441f1 | SQL | jonathanferreiras/backend_triider | /tridder.sql | UTF-8 | 878 | 3.6875 | 4 | [] | no_license | CREATE SEQUENCE schedules_seq;
CREATE TABLE schedules (
idschedules INTEGER CHECK (idschedules > 0) NOT NULL DEFAULT NEXTVAL ('schedules_seq'),
users_iduser INTEGER CHECK (users_iduser > 0) NOT NULL,
name VARCHAR(100) NULL,
date TIMESTAMP(0) NULL,
place VARCHAR(200) NULL,
blocking BOOL NULL,
requester ... | true |
d38cfdf9692e99824faafee32a4b6b1acf8dec5e | SQL | DominiqueSparrow/Spring1 | /resources/sql/create.sql | UTF-8 | 355 | 3.484375 | 3 | [] | no_license | drop table customer_request;
create table customer_request (
request_id INTEGER ,
timestamp timestamp,
customer_id number(10),
request_address varchar(30),
primary key(request_id),
constraint customer_request_fk
foreign key (customer_id)
references CUSTOMERS(CUSTOMER_ID)
);
CREAT... | true |
2749e3c357b960a458bc072c30a483743bd80304 | SQL | rameshlakshman/hadoop-training-projects-1 | /hive/nyse_trading/table_creation.sql | UTF-8 | 2,225 | 3.640625 | 4 | [] | no_license | -- create a database for this project
create database handson_nasdaq;
--Create a managed table for NASDAQ daily prices data set.
create table tbl_nasdaq_daily_prices (
exchange_name string,stock_symbol string,date string,stock_price_open float,
stock_price_high float,stock_price_low float,stock_price_close float,
s... | true |
8bdc6f357a5207c4d1f73382f508b86e77b126c8 | SQL | a-wq/webprojs | /dbscript/furnit.sql | UTF-8 | 12,612 | 3.296875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2018 at 04:16 PM
-- Server version: 10.1.34-MariaDB
-- 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 |
c5143645eeae8755594f52079b08453dacb68bab | SQL | rukiyedemirci/ORACLE-KODLUYORUZ | /RUKİYE_QUERY/BANKING_QUERY.sql | ISO-8859-9 | 1,070 | 3.875 | 4 | [] | no_license |
--Yln 4. aylarnda en ok hangi amala kredi ekilmi?tir?
SELECT COUNT(L.purpose),l.purpose FROM TRANSACTIONS T
INNER JOIN ACCOUNTS A ON T.account_d = A.account_d
INNER JOIN LOANS L ON L.account_d = A.account_d
WHERE L.month = 4
group by l.purpose;
--Hangi yllarda ka hesap almtr?
select count(account_d) as Hesap... | true |
b22c87acb5feb241c9b7b8687f0895b81d65806d | SQL | dapser75/BBDDModulo5MYSQL | /youtube.sql | UTF-8 | 14,481 | 3.296875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Wed Jan 27 10:28:52 2021
-- Model: New Model Version: 1.0
-- 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='ON... | true |
3145ab5c9fb69a152cab7db454983a25ffdfbee9 | SQL | MichaelDevenport/chromotype_test | /db/structure.sql | UTF-8 | 10,174 | 3.25 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpg... | true |
7445d3569bf7c418ac83398ab107d5f064cee3e1 | SQL | ArnaudW29/projet1TIrhum | /BACKEND/scripts-db/creation-table/tbUnite.sql | UTF-8 | 236 | 2.796875 | 3 | [] | no_license | /* ARNAUD WAETERMANS
creation de la table avec les unites */
CREATE TABLE tbUnite (
uniteId INTEGER NOT NULL DEFAULT AUTOINCREMENT,
uniteNom VARCHAR(15) NOT NULL,
uniteSymbole VARCHAR(3) NULL,
CONSTRAINT pk_tbUnite PRIMARY KEY (uniteId)
);
| true |
7151c66a7e21ac8ff55927600dae32c2246b0ebc | SQL | fflch/dados | /Queries/conta_beneficios.sql | UTF-8 | 202 | 3.09375 | 3 | [] | no_license | SELECT count(bc.dtainiccd)
FROM LOCALIZAPESSOA l
JOIN BENEFICIOALUCONCEDIDO bc
ON l.codpes = bc.codpes
WHERE bc.dtainiccd LIKE '%__ano__%'
AND l.codundclg = 8
AND bc.codbnfalu = __beneficio__
| true |
6878a7c03c6f932faf4aac8e32dac10df5cbf6a1 | SQL | QuyenLy87/release-validation-framework | /importer/src/main/resources/scripts/file-centric/file-centric-snapshot-association-valid-targetcomponentid.sql | UTF-8 | 676 | 3.234375 | 3 | [
"Apache-2.0"
] | permissive |
/********************************************************************************
file-centric-snapshot-association-valid-targetcomponentid
Assertion:
TargetComponentId refers to valid concepts in the ASSOCIATION REFSET snapshot file.
******************************************************************************... | true |
dea2cdb9a9b10b6ee0707873a86d792915ef5fdc | SQL | aborngra/apex-connect-2017 | /HR_WM/050_Indexes/LOC_CITY_IX.sql | UTF-8 | 533 | 3.21875 | 3 | [] | no_license | /* This anonymous block creates a index named LOC_CITY_IX
PL/SQL Block is restartable, so it can be executed n times, but
only creates the index if it does not exist.
%author ABO
%created 2017-04-19 22:16:13
*/
DECLARE
v_index_name user_indexes.index_name%TYPE := 'LOC_CITY_IX';
BEGIN
FOR i IN (SELE... | true |
70fc5f79698075eb95c3107c090fcfa4113c4547 | SQL | bearcheese/itm-blog | /itm-java/itm-common/mysql-schema.ddl | UTF-8 | 2,528 | 4.4375 | 4 | [] | no_license |
alter table comments
drop
foreign key comments_user_id_fk;
alter table comments
drop
foreign key comments_post_id_fk;
alter table posts
drop
foreign key posts_author_fk;
drop table if exists comments;
drop table if exists contact_messages;
... | true |
fd4e62650e30f81a9aaca5f1d3264b6060bc7db4 | SQL | premsingh4github/japanconsultancy | /routes/cast_chubi_system (4).sql | UTF-8 | 95,477 | 2.8125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 23, 2019 at 09:24 AM
-- Server version: 10.2.22-MariaDB
-- 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... | true |
dc15c1f178c56be9a06b6379b75945d1704bb50a | SQL | YairPR/Oracle | /Scripts/size_bd_obj/top_10_xtablespace.sql | UTF-8 | 322 | 3.171875 | 3 | [] | no_license | select * from (select owner as "Schema"
, segment_name as "Object Name"
, segment_type as "Object Type"
, round(bytes/1024/1024/1024,2) as "Object Size (Mb)"
, tablespace_name as "Tablespace"
from dba_segments
where tablespace_name ='&tbsname'
and segment_type in ('TABLE','INDEX') order by 4 desc )
where rownum < 11
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.