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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ed3fc0a534cb87138eed8f0157564a6baa72f04a | SQL | sutz2001/scripts_public | /Reporting/Patchreport.sql | ISO-8859-1 | 926 | 3.25 | 3 | [] | no_license | ;With CTE_SQLEditions([Major],[Minor],[Build],[BuildMinor])
AS
(
select
parsename(convert(varchar,serverproperty ('productversion')),4) As Major,
parsename(convert(varchar,serverproperty ('productversion')),3) As Minor,
parsename(convert(varchar,serverproperty ('productversion')),2) As Build,
parsename(conv... | true |
04f9f53b703d6ee6c187acbbd85c58eec15bebc3 | SQL | typoholic01/jygiyo | /src/sql/JUGIYO_user_details.sql | UTF-8 | 399 | 2.578125 | 3 | [] | no_license | CREATE TABLE JUGIYO_CUSTOMER (
CUSTOMER_ID VARCHAR2(100) PRIMARY KEY,
USER_NAME VARCHAR2(100) NOT NULL,
PASSWORD VARCHAR2(100) NOT NULL,
PHONE_NUMBER VARCHAR2(100) NOT NULL,
ADDRESS VARCHAR2(100) NOT NULL,
STATUS VARCHAR2(100) NOT NULL
);
select * from JUGIYO_CUSTOMER;
delete from JUGIYO_CUSTOM... | true |
796f8a7d746e6f09d1f05fc55c69cb1c5b9033ef | SQL | RSAsir/ABD | /Practicas/02 - Resoluciones/U.T III. - Elementos de MySQL/302/302-4a.sql | UTF-8 | 129 | 2.71875 | 3 | [] | no_license | SELECT
nombrecompañía
FROM
compraventa.clientes c
WHERE NOT EXISTS
(SELECT * FROM pedidos p WHERE p.IdCliente = c.idcliente) | true |
fcbbf7f20859fe793f490d37d41cc5e7994f5c0c | SQL | cornelioroyer/abaco-design | /s_pla_liquidacion_acumulados.sql | UTF-8 | 301 | 2.921875 | 3 | [] | no_license | select pla_liquidacion_acumulados.*
from pla_liquidacion, pla_liquidacion_calculo, pla_liquidacion_acumulados
where pla_liquidacion.id = pla_liquidacion_calculo.id_pla_liquidacion
and pla_liquidacion_calculo.id = pla_liquidacion_acumulados.id_pla_liquidacion_calculo
and pla_liquidacion.compania = 30 | true |
f1fd60291a8eaad51e7373fe9d41c3fea377a1be | SQL | michirem/FE21-CR10-MichaelR | /database/CR10_MichaelR_BigLibrary.sql | UTF-8 | 6,064 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 23, 2021 at 11:45 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
02824f229594d2f1e98a8d6193e9aa8ac21e3836 | SQL | matheusbuniotto/SQL | /ep04/Ex1.sql | UTF-8 | 463 | 4.03125 | 4 | [] | no_license | -- Qual o valor total de receita gerada por clientes de cada estado?
-- Considere a base completa, com apenas pedidos entregues
SELECT
t2.customer_id,
sum(t1.price) as valor_vendas,
t3.customer_state
FROM
tb_order_items t1
LEFT JOIN tb_orders t2
ON t1.order_id = t2.order_id
LEFT JOIN tb... | true |
d7a0ded0db912a11ee252d2b45ba3f81c677c1c7 | SQL | sezerp/BADB109261 | /db/fakturowanie/src/main/resources/sqlFiles/lab6/lab6-003-create-miasta-table.sql | UTF-8 | 190 | 2.515625 | 3 | [] | no_license | CREATE TABLE miasta
(kod_pocztowy VARCHAR(6) not null, primary key(kod_pocztowy),
kod_w char(3) not null,
foreign key (kod_w) references wojewodztwa(kod_w),
miasto varchar(30) not null
); | true |
c140a61f484ee928759c3b84a0939a6ab22d23de | SQL | rentsoftSAS/rentsoft | /RentSoft/scriptsBD/del_anexos.sql | UTF-8 | 338 | 2.828125 | 3 | [] | no_license | use rentsoftbd;
DELIMITER $$
DROP PROCEDURE IF EXISTS del_anexos $$
CREATE PROCEDURE del_anexos
(in p_id int,
in p_IdUsuarioModifica int)
BEGIN
declare fechaActual datetime;
set fechaActual = now();
update anexos
set
activo=0,
IdUsuarioModifica= p_IdUsuarioModifica ,
FechaModificacion= fechaActual
where id=p_id;... | true |
b24ce4a7b097fd8baf740980a81119c56e34af4d | SQL | huaidandaidai/java_learn | /learn_data_structure/src/org/leetcode/mysql/超过经理收入的员工.sql | UTF-8 | 1,009 | 4.625 | 5 | [] | no_license | /*
题目:https://leetcode-cn.com/problems/employees-earning-more-than-their-managers/
Employee表包含所有员工,他们的经理也属于员工。每个员工都有一个 Id,此外还有一列对应员工的经理的 Id。
+----+-------+--------+-----------+
| Id | Name | Salary | ManagerId |
+----+-------+--------+-----------+
| 1 | Joe | 70000 | 3 |
| 2 | Henry | 80000 | 4 |... | true |
00d1a6998bfde9eadab267b32f14ece70f576dd5 | SQL | Nick-Patrick/Tiko-Time | /app/db/ddl/alter_constraints.sql | UTF-8 | 6,178 | 4.03125 | 4 | [] | no_license | ## Alter constraints to give primary keys
## Clients ##
ALTER TABLE `clients`
ADD PRIMARY KEY(
`client_id`);
ALTER TABLE `clients`
CHANGE COLUMN `client_id` `client_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT;
###################
## Comments ##
ALTER TABLE `comments`
ADD PRIMARY KEY(
`comment_... | true |
c99d7a3effd011aca57fbfd3794be9146e799b38 | SQL | MilaHG/LPF_sites_portfolio | /jonathan_bourdarias/Portfolio Jonathan 2/Portfolio Jonathan 2/template_bootstrap_agency/startbootstrap-agency-gh-pages/sql/site_portfolio.sql | UTF-8 | 6,066 | 3.1875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 21 déc. 2018 à 16:35
-- Version du serveur : 10.1.31-MariaDB
-- Version de PHP : 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
d5da47a3f299b8a8d6ab5236818d798aceca638e | SQL | acevedocar79/abanking_environment | /user_component/sql/3_create_tables.sql | UTF-8 | 3,737 | 3.5 | 4 | [] | no_license | /*
* Copyright (c) 2016 Anzen Soluciones S.A. de C.V.
* Mexico D.F.
* All rights reserved.
*
* THIS SOFTWARE IS CONFIDENTIAL INFORMATION PROPIETARY OF ANZEN SOLUCIONES.
* THIS INFORMATION SHOULD NOT BE DISCLOSED AND MAY ONLY BE USED IN ACCORDANCE THE TERMS DETERMINED BY THE COMPANY ITSELF.
*/
-- start ccs_cre... | true |
d7e5892a4964e83af45d547466be665872f635fe | SQL | igorthribeiro/oracle-sql-plsql | /97000/Aulas/AULA3.sql | ISO-8859-1 | 3,670 | 3.703125 | 4 | [] | no_license | SELECT LOWER('Curso Fundamentos SQL') FROM DUAL;
SELECT LOWER(FIRST_NAME) FROM EMPLOYEES;
SELECT UPPER(FIRST_NAME) FROM EMPLOYEES;
SELECT INSTR('HelloWorldW','WWW') FROM DUAL;
SELECT LPAD(FIRST_NAME,12,'*') FROM EMPLOYEES;
SELECT RPAD(UPPER(FIRST_NAME),12,'*-') FROM EMPLOYEES;
SELECT ROUND(10/3,4) FROM DUAL;
SEL... | true |
62630e4cdc51f843acb557c1710aeed46ba33743 | SQL | mpetrov83/icar | /work/ttx_job_codes.sql | UTF-8 | 3,986 | 3.015625 | 3 | [] | no_license | CREATE TABLE ttx_repair_codes
(
repair_code VARCHAR2(4),
carinit VARCHAR2(4),
car_class VARCHAR2(6),
description VARCHAR2(40)
)
TABLESPACE ICARDATSPACE;
CREATE UNIQUE INDEX ttx_repair_codes_ix01
ON ttx_repair_codes
(
repair_code,
carinit,
car_class
)
TABLESPACE ICARIDXSPACE;
CREATE TABLE ttx_car_t... | true |
a49c91cc28dc7d233720100d90eab1d4c060d495 | SQL | AlStar01/angular2-express | /api/tags/product_tag.sql | UTF-8 | 390 | 3.65625 | 4 | [] | no_license | DROP TABLE IF EXISTS `Product_Tag`;
CREATE TABLE `Product_Tag` (
`product_id` integer not null,
`tag_id` integer not null,
foreign key(`product_id`) references `Product`(`id`),
foreign key(`tag_id`) references `Tag`(`id`),
primary key (`product_id`, `tag_id`)
);
CREATE UNIQUE INDEX `product_ta... | true |
97c8766436c3ea7e68315774178dde1f75d26f2a | SQL | yiguolei/incubator-doris | /docker/thirdparties/docker-compose/trino/scripts/create_trino_table.sql | UTF-8 | 6,959 | 3.046875 | 3 | [
"OpenSSL",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-facebook-patent-rights-2",
"PSF-2.0",
"dtoa",
"MIT",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain"
] | permissive | -- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may... | true |
bdd792ad3deec6688b6579a07c383601b0c511e6 | SQL | radtek/Database-3 | /oracle/admin/scripts/dba_scheduler_programs.sql | UTF-8 | 590 | 2.515625 | 3 | [] | no_license | --dba_scheduler_programs
col program_action for a45
col owner for a10
col number_of_arguments for 9
col program_name for a25
col comments for a80
set lines 400
select * from dba_scheduler_programs
/
PROMPT
PROMPT *****************************************************
PROMPT Windows: dba_scheduler_windows... | true |
acc957d916aba57b81eabe1ffc1147c1f3cd5d2a | SQL | michaelaoash/rsei237 | /gmx/albers.sql | UTF-8 | 9,695 | 3.46875 | 3 | [] | no_license | -- Albers Conical Equal-Area
-- Converts latitude, longitude to northing, easting
-- http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html
-- John Snyder, Map Projections, A Working Manual, USGS
-- http://pubs.er.usgs.gov/djvu/PP/PP_1395.pdf
-- http://en.wikipedia.org/wiki/North_American_Datum
-- http://en.... | true |
6997cb7cf5c0fa7372f2005ded4c8096bece6eb1 | SQL | nandanagg22/bookyourshow | /src/main/resources/data.sql | UTF-8 | 1,545 | 2.890625 | 3 | [] | no_license | ------------ CITY MASTER DATA -------------------
INSERT INTO City(id, name) VALUES (1, 'Bangalore');
INSERT INTO City(id, name) VALUES (2, 'Mumbai');
INSERT INTO City(id, name) VALUES (3, 'Delhi');
------------ THEATRE MASTER DATA -------------------
INSERT INTO Theatre(id, name, city, address) VALUES (1, 'pvr', 'Ban... | true |
61afb96514470a0ddda524ae8804ea78e1d5caab | SQL | FulbertGato/GLRS_MAE_JAVA_ISM | /ges_etu_glrs_mae_2022.sql | UTF-8 | 2,446 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 01 oct. 2021 à 19:26
-- Version du serveur : 5.7.31
-- Version de PHP : 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
eee9444fcb96eb0b76b8c689b9438e00286405b6 | SQL | brycemcl/BootcampX | /3_queries_group-by/busy_days.sql | UTF-8 | 132 | 3.21875 | 3 | [] | no_license | SELECT "day",
COUNT( "id" ) as total_assignments
FROM "assignments"
GROUP BY "day"
HAVING COUNT( "id" ) >= 10
ORDER BY "day" ASC; | true |
b38b28acf08c00898ac613af7a822b68a24c7cc4 | SQL | HHHHH-Y/MySQL | /查询表A中id重复出现3次以上的记录/solution.sql | UTF-8 | 258 | 3.453125 | 3 | [] | no_license | -- 查询表 A 中 id 出现三次以上的记录
-- 首先查询出现三次以上的 id
select id from A group by id having count(id) > 3
-- 查询这些 id 对应的信息
select * from A where id in (select id from A group by id having count(id) > 3); | true |
737eb24726dc718d3b437b82a658a277072bcbe5 | SQL | hungpqz/hungpqz.github.io | /luckydraw_dongtam/mysql/check duplicate.sql | UTF-8 | 1,069 | 2.9375 | 3 | [] | no_license | SELECT *
FROM customer1 INNER JOIN customer1_full
ON customer1.IMEI=customer1_full.IMEI;
SELECT * FROM mld.customer1
where
(PHONE not like '086%')
and (PHONE not like '088%')
and (PHONE not like '089%')
and (PHONE not like '090%')
and (PHONE not like '091%')
and (PHONE not like '092%')
and (PHONE not like '093%')
an... | true |
6aabf981f990cf1cdfcb38bfc75b0486404c357f | SQL | GopisettyVasavi/ANZAccountsApplication | /src/main/resources/schema.sql | UTF-8 | 881 | 3.703125 | 4 | [] | no_license |
DROP TABLE IF EXISTS TBL_CUSTOMER_DETAILS;
DROP TABLE IF EXISTS TBL_ACCOUNT_DETAILS;
DROP TABLE IF EXISTS TBL_TRANSACTION_DETAILS;
CREATE TABLE TBL_CUSTOMER_DETAILS (
cust_id BIGINT PRIMARY KEY,
cust_full_name VARCHAR(250) NOT NULL,
location VARCHAR(250)
);
CREATE TABLE TBL_ACCOUNT_DETAILS (
account_no ... | true |
825c614a6c564ae3ba9192439df5149d18c54fb1 | SQL | mokhtaralgholi/MySQL_Exercises | /exercise19.sql | UTF-8 | 982 | 3.359375 | 3 | [] | no_license | use employees;
select * from employees;
insert into employees select max(emp_no) + 1,'1976-01-01','John','Thompson','M','2018-06-18' from employees;
select * from employees where first_name = 'John';
select max(emp_no),'1976-01-01','John','Thompson','M','2018-06-18' from employees;
-- create employee record
-- create ... | true |
be6726608c380574227f05ef2eac0647f56fde84 | SQL | ReneNyffenegger/oracle-patterns | /Installed/dbms/space_admin/segment_dump/go.sql | UTF-8 | 1,005 | 2.984375 | 3 | [] | no_license | create table tq84_space_admin_seg_dmp_tst (
num number,
txt varchar2(1000)
);
begin
for i in 1 .. 20 loop
insert into tq84_space_admin_seg_dmp_tst values(i, rpad('*', 1000, '*'));
end loop;
end;
/
commit;
declare
ts_name varchar2(128);
file_id number;
block_id number;
dump_fi... | true |
e9e6f1e3cf8aaa06a691bb96e0f6d35ddf39f1e8 | SQL | mvladoi/CMPS-182-Introduction-To-Database-Management-Systems | /Cmps182/lab2/script1.sql | UTF-8 | 985 | 3.1875 | 3 | [] | no_license |
CREATE TABLE dv_customer (
customer_id INT,
first_name VARCHAR(50),
last_name VARCHAR(50),
email VARCHAR(50),
address_id INT,
active BOOLEAN
);
CREATE TABLE dv_address (
address_id INT,
address VARCHAR(50),
adress2 VARCHAR(50),
district VARCHAR(50),
city_id INT,
postal_code VARCHAR(50),
ph... | true |
29d28bc2280c7ff257a8ce3a8c8a00685a8c549b | SQL | ToThanhNam18t3/a0720i1_ToThanhNam | /module3/2_Thiết kế và tạo CSDL/BaiTap/1_XacDinhKhoaNgoaiCuaBang.sql | UTF-8 | 989 | 3.65625 | 4 | [] | no_license | use testing;
CREATE table Customers(
customer_number INT(30) PRIMARY KEY,
fullname varchar(30) NOT NULL,
address varchar(50) NOT NULL,
email varchar(50),
phone int(10) NOT NULL
);
CREATE table Accounts(
account_number INT(11) NOT NULL,
account_type VARCHAR(20) NOT NULL,
date_Open DATE NOT ... | true |
165bd62b3e68889c2d5851e24fefcb4b7e9a1e3a | SQL | dukeofharen/httplaceholder | /src/HttPlaceholder.Persistence/SqlScripts/Migrations/mysql/002_responses_table.migration.sql | UTF-8 | 446 | 2.90625 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*Add responses table*/
CREATE TABLE IF NOT EXISTS `responses`
(
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`status_code` INT NOT NULL,
`headers` LONGTEXT NOT NULL,
`body` LONGTEXT NOT NULL,
`body_is_binary` TINYINT(1) NOT NULL,
PRIMARY KEY (`id`),
FO... | true |
452a60f9774e06a13ba1a5e4d48b9f4a8e375b95 | SQL | mbouchett/My-Resource-Connect | /db/myresour_data_table_donors.sql | UTF-8 | 718 | 2.59375 | 3 | [] | no_license |
-- --------------------------------------------------------
--
-- Table structure for table `donors`
--
CREATE TABLE `donors` (
`donor_ID` int(11) NOT NULL,
`donor_name` tinytext NOT NULL,
`donor_email` tinytext NOT NULL,
`donor_telephone` tinytext NOT NULL,
`donor_verified` tinyint(1) NOT NULL DEFAULT '0'... | true |
88e023cb00528156e6e257cfb72b8df3191b9252 | SQL | Casperoazanda/CouponManagement | /coupon-service/coupon-distribution/target/classes/sql/create_table.sql | UTF-8 | 767 | 3.4375 | 3 | [
"MIT"
] | permissive | -- 创建 coupon 数据表
CREATE TABLE IF NOT EXISTS `imooc_coupon_data`.`coupon` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`template_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联优惠券模板的主键',
`user_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '领取用户',
`coupon_code` varchar(64) NOT NULL DEFAULT '' COMMENT '优惠券码',... | true |
7b62830b5d2d6c8e249e933813e6bcaa92dc2496 | SQL | sreeman2/SSISPackages | /Miscellaneous/CTS_Dhanya/Porsche_Vin_Nbrs.sql | UTF-8 | 973 | 2.9375 | 3 | [] | no_license | -- STAGING
SELECT *
FROM PES_STG_VIN (NOLOCK)
WHERE BL_NBR IN
(
'GZ07BABR0004',
'AS059NGO5047',
'AS059YOK5050',
'MM002YOK5062',
'PHX219233700',
'GZ07BALH0007',
'MSCUMC990423',
'6062747059',
'NWGJ2697074',
'NWGJ2697074',
'MSCUAR012152',
'S306429776',
'S306379947',
'PHX223061100',
'MIA051919',
'MSCUMC967421',
'S306376... | true |
b1c89d3b42bba275f8cafee98a91f3ada9f6c9aa | SQL | oliverito11/DAM-1 | /BD/Trimestre2/Tema 5/Ejercicios/LinaresColinasOliver.sql | UTF-8 | 5,119 | 3.859375 | 4 | [] | no_license | -- EJERCICIO A --
USE EJERCICIOS;
DROP TABLE IF EXISTS RESTRIC;
CREATE TABLE RESTRIC(
COD INT UNIQUE,
NOM VARCHAR(10) NOT NULL,
LET CHAR(2) DEFAULT 'A',
CANT INT,
CONSTRAINT CK_CANT CHECK(CANT > 0 AND CANT < 10)
);
-- INSERCCIÓN DE VALORES --
-- CANT NO PUEDE SER MAYOR DE 10 --
INSERT I... | true |
86d4593b7126a0baac16e5dd3b9fc59ea5749100 | SQL | emanuelanechei/oracle_ready2run_scripts | /fsqltext.sql | UTF-8 | 657 | 2.65625 | 3 | [] | no_license | @@sqlplus_settings_store
set longchunksize 1000000
set linesize 9999
set long 1000000
set heading off verify off autotrace off feedback off
set timing off
set wrap on
set pagesize 1000
col sql_fulltext format A64 WORD_WRAPPED
select sql_fulltext
from (
select sql_fulltext
from g... | true |
4f4613342681e0686908f614795eb5d559264fd4 | SQL | demonchang/house | /SQL/ganji.sql | UTF-8 | 888,929 | 2.828125 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.01 (MySQL 5.5.42)
# Database: ganji
# Generation Time: 2019-04-01 03:01:49 +0000
# **************************************************... | true |
e9e42fba490feec997b68b7a3c8ac8b27451f4ac | SQL | ThuanyMendonca/SQLSERVER | /Revisao1.sql | ISO-8859-1 | 3,462 | 4.46875 | 4 | [] | no_license | -- Criando banco de dados
create database revisao
-- go para executar os dois comandos create e use (pq para executar, o banco precisa existir)
use revisao
-- Tem a possibilidade de fazer diferena entre letras maiusculas e minusculas
-- Criar chave primria no momento da criao da tablea primary key identity(1,1)
create... | true |
52d0500757488da76ed3a9528bc01e2184d5a4d4 | SQL | danidark9312/ToyStore | /Dump20190410.sql | UTF-8 | 6,706 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: toyslovedb
-- ------------------------------------------------------
-- Server version 5.7.20-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
6b75ae0d26cc6da080bdec7566975a10dfd19fa3 | SQL | rupalimoentek/test-git | /api2/sql/201801/20180108_0001.sql | UTF-8 | 3,267 | 2.515625 | 3 | [] | no_license |
INSERT INTO component
(component_id,component_name, component_desc)
VALUES (133,'Additional Tracking Number: Monthly Cqm', ''),
(134,'Additional Local Tracking Number: Annual Cqm', ''),
(135,'Additional Tracking Number Cqm', ''),
(136,'Minute Blocks Monthly: 500 Cqm', ''),
(137,'Additional Basic User: Monthly Cqm', ... | true |
0d569ec2b5a8dc01a82ba023f9d6a76033e9a39e | SQL | BaobabHealthTrust/bart2_triggers | /procedures/hotline/proc_insert_hotline_basics.sql | UTF-8 | 3,938 | 3.90625 | 4 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS `proc_insert_hotline_basics`$$
CREATE PROCEDURE `proc_insert_hotline_basics`(
IN in_patient_id INT,
IN in_date_created DATE,
IN in_creator INT
)
BEGIN
SET @cell_phone_number = (SELECT person_attribute_type_id
FROM person_attribute_type
... | true |
6c678d83534b6793413179004b0590dc022c5300 | SQL | yaoxiaojuan/ReadParty | /readparty.sql | UTF-8 | 14,956 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2016-04-29 09:37:03
-- 服务器版本: 5.6.19-0ubuntu0.14.04.1
-- PHP 版本: 5.5.9-1ubuntu4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
ccc2cbe3fe3ac1ecbf9746d0614daad2591b49b5 | SQL | Fluance/fec-backend | /fec-db/be-ehda-demographic/granulaoperate/tables/nextofkin.sql | UTF-8 | 1,123 | 3.625 | 4 | [] | no_license | -- Table: nextofkin
-- DROP TABLE nextofkin;
CREATE TABLE nextofkin
(
id bigserial NOT NULL,
patient_id bigint NOT NULL,
lastname character varying(255),
firstname character varying(255),
courtesy character varying(255),
type character varying(255),
address character varying(255),
address2 character v... | true |
671caec7aab53ef114274ae2efb03c3bd2a66771 | SQL | JohnEvans89/Venmo-Clone | /java/database/sample queeries.sql | UTF-8 | 375 | 2.875 | 3 | [] | no_license | SELECT * FROM transfers
WHERE ? IN (account_from,account_to)
insert into transfers(transfer_id ,transfer_type_id,transfer_status_id,
account_from, account_to, amount)
values (100,2,2,2,4,20.00)
insert into transfers(transfer_id ,transfer_type_id,transfer_status_id,
account_from, account_to, amount)
values (101,2,2,4... | true |
c76efd3de893ccf8bd119d05fd75518bf982f7c4 | SQL | azizfuady/16650030-responsi | /book.sql | UTF-8 | 3,678 | 3.03125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 06 Apr 2019 pada 04.47
-- Versi Server: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
b4a557dff00186a2f153f28b8d80eac9cc17fd42 | SQL | eugeniosant/entando-core-engine | /src/main/resources/sql/plugins/jacms/port_data_production.sql | UTF-8 | 5,637 | 2.828125 | 3 | [] | no_license | INSERT INTO widgetcatalog (code, titles, parameters, plugincode, parenttypecode, defaultconfig, locked, maingroup) VALUES ('content_viewer', '<?xml version="1.0" encoding="UTF-8"?>
<properties>
<property key="en">Contents - Publish a Content</property>
<property key="it">Contenuti - Pubblica un Contenuto</property>
</p... | true |
a38e1d35c8b61b532592d3b3f603d0576b1b2903 | SQL | pedrofernandoch/database-lab | /Project II/Exec01/Exec01.sql | UTF-8 | 462 | 3.578125 | 4 | [] | no_license | /****** Questão 1 ******/
/* Query 1: quantidade de homens e mulheres registrados */
SELECT ic_sexo, COUNT(ic_sexo) FROM pacientes GROUP BY ic_sexo;
/* Query 2: ano de nascimento do paciente mais idoso */
SELECT MIN(aa_nascimento) as "Mais velho", MAX(aa_nascimento) as "Mais novo" FROM pacientes;
/* Query 3: quantid... | true |
3fd36b6414b8af7761e94dde742ce0aaec733a7e | SQL | pradeepmcl/yelp-data-mgr | /src/main/resources/create_scheme.sql | UTF-8 | 3,287 | 3.453125 | 3 | [] | no_license | CREATE TABLE User (
id_usr MEDIUMINT NOT NULL AUTO_INCREMENT,
id_original_usr VARCHAR(30) NOT NULL,
name_usr VARCHAR(50) NOT NULL,
yelping_since_usr DATE NOT NULL,
review_count_usr MEDIUMINT NOT NULL,
fans_usr MEDIUMINT NOT NULL,
type_usr VARCHAR(20) NOT NULL,
avg_stars_usr FLOAT(6,5),
votes_funny_usr... | true |
14d3c0ea8ced49a895b5a853494ab6b026811051 | SQL | damducthoai/simple-cas | /schema.sql | UTF-8 | 1,675 | 3.796875 | 4 | [] | no_license | drop database if exists simple;
create database simple;
use simple;
create table if not exists user(
`user_id` bigint(22) auto_increment,
`user_email` varchar(255) not null,
`user_password` varchar(255) not null,
primary key `user_id` (`user_id`),
unique key `email` (`user_email`),
index `user_email_index` (`use... | true |
c9e6e3faffaf8068a1c1567e716186265402b91e | SQL | jlexternal/RLVOLUNP_template | /sql_queries.sql | UTF-8 | 2,803 | 3.640625 | 4 | [] | no_license | /* SQL queries to build the main experimental task database */
-- use tables within specified database
USE main_db;
-- create main_table
CREATE TABLE main_table(
isubj INT NOT NULL,
unique_id CHAR(13) NOT NULL,
task_completion_flag BOOL,
questionnaire_completion_flag BOOL,
prolific_id CHAR(24),
bonus_flag... | true |
8cef313e904936977d391f7f08976a7ad12e1588 | SQL | JoelNinanJohnson/DBMS-LAB | /LAB 8 - STUDENT ENROLLMENT/Query 1/Query1.sql | UTF-8 | 824 | 3.484375 | 3 | [] | no_license | create database Student_Enrollment;
use Student_Enrollment;
create table student(
regno varchar(20),
name varchar(30),
major varchar(20),
bdate date,
primary key (regno)
);
create table course(
courseno int,
cname varchar(20),
dept varchar(20),
primary key (courseno)
);
create table enroll(
regno varchar(20),
co... | true |
28fe0a1993ae715f83605bd2be7e54b09956bdd3 | SQL | bentheterrible/nextgen-project | /create-nextgen-table-template.sql | UTF-8 | 550 | 2.78125 | 3 | [] | no_license | /*
Dec 24, 2014
This is a template for creating tables in the nextgen db.
Simply replace 'table_name' with the desired name of the
table you want and copy and paste it into the mysql command
line and that's it.
*/
CREATE TABLE table_name
(
id int not null auto_increment primary key,
first_name var... | true |
f1aa87d8ceb1536bba71a98f270e5e4b52fa617f | SQL | Viniciuscoding/MySQL | /MySQL Basics.sql | UTF-8 | 2,724 | 4.25 | 4 | [] | no_license | ---------------------------------------------------------------------
-- MySQL Basics
---------------------------------------------------------------------
USE TSQL2012;
SELECT * FROM hr.employees;
SELECT employees.country FROM hr.employees;
SELECT DISTINCT employees.country FROM hr.employees;
SELECT employees.emp... | true |
fe23a19516e5e4b440b9ae90d739f18fc8b464e4 | SQL | mbts8984/prime-solo-sql | /database.sql | UTF-8 | 2,370 | 4 | 4 | [] | no_license | CREATE TABLE accounts (
user_id serial PRIMARY KEY,
username varchar(12) NOT NULL,
city varchar(128),
transactions_completed integer,
transactions_attempted integer,
account_balance numeric(12,2)
);
INSERT INTO accounts (username, city, transactions_completed, transactions_attempted, account_ba... | true |
048779b9963836a67a2cca67cc25a69860b0b10c | SQL | tedchain/tedchain-technology | /tools/Tedchain.SqlServer.Schema/Stored Procedures/GetRecordRange.sql | UTF-8 | 332 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | CREATE PROCEDURE [Tedchain].[GetRecordRange]
@instance INT,
@from VARBINARY(512),
@to VARBINARY(512)
AS
SET NOCOUNT ON;
SELECT Records.[Key], Records.[Value], Records.[Version]
FROM [Tedchain].[Records]
WHERE Records.[Instance] = @instance AND Records.[Key] >= @from AND Records.[Key] < @to... | true |
2cd5ad13ec535428b0d1325d2364ba801dc96857 | SQL | Pathik1973Git/MyFirstRepo | /db_Test/db_Test/DASH/Views/v_BATCH_SCHD_COUNTS.sql | UTF-8 | 663 | 3.484375 | 3 | [] | no_license |
CREATE VIEW [DASH].[v_BATCH_SCHD_COUNTS]
AS
SELECT B.SCHEDULE_TYPE_VALUE_ID, CNT, isnull(Complete,0) As Complete
FROM AM.BATCH_CTRL_MASTER B
LEFT JOIN
(
SELECT SCHEDULE_TYPE_VALUE_ID, COUNT(1) as CNT
FROM AM.ARTIFACT_CTRL_MASTER
GROUP BY SCHEDULE_TYPE_VALUE_ID
) X ON X.SCHEDULE_TYPE_VALUE... | true |
1f00d0240d65e9b65d1e5769236d7815075fc90d | SQL | hannenz/ContactPlugin | /Config/contact.sql | UTF-8 | 511 | 2.734375 | 3 | [] | no_license | --
-- MySQL 5.1.49
-- Sat, 14 Jan 2012 09:34:30 +0000
--
CREATE TABLE `messages` (
`id` int(11) not null auto_increment,
`created` datetime,
`recipients` varchar(255),
`success` tinyint(1),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=79;
CREATE TABLE `message_details` (
`i... | true |
79293b806393c908491729dbd4c6f720d35c1fda | SQL | 666jiao/git_warehouse | /htdocs/My_Project/MySQL/huimaiche.sql | UTF-8 | 1,326 | 2.875 | 3 | [] | no_license | CREATE DATABASE huimaiche CHARSET=UTF8;
USE huimaiche;
SET NAMES GBK;
CREATE TABLE car(
cid INT PRIMARY KEY AUTO_INCREMENT,
cname VARCHAR(10),
pic VARCHAR(100),
price DECIMAL(10,2),
pubtime DATETIME,
type VARCHAR(10)
);
INSERT INTO car VALUES(null,'雪佛兰','1.jpg',400000,now(),'lt1')... | true |
e2e477967c4d03f4837c1810e7d332a798f305cf | SQL | eeuoo/my_study_log | /sql/MySQL_exam_4.sql | UTF-8 | 1,181 | 3.828125 | 4 | [] | no_license |
drop procedure if exists lecture_best3;
delimiter $$
create procedure lecture_best3()
BEGIN
drop view if exists lecture_base1;
create view lecture_base1 as
select max(sub.name) as sub_name,
count(*) as student_cnt,
round(avg(g.avr), 2)as total_avg ,
max(p.name) as prof_name, ... | true |
8612a3a3e921ac6fa27f0aabea91cdb3db718ea1 | SQL | anandeka/my-project | /DBScripts/MasterScripts/Master_Scripts_19.sql | UTF-8 | 8,639 | 2.828125 | 3 | [] | no_license | UPDATE AXM_ACTION_MASTER SET ACTION_NAME = 'Mark For Tolling'
WHERE ACTION_ID = 'MARK_FOR_TOLLING';
UPDATE AXM_ACTION_MASTER SET ACTION_NAME = 'Returned Output'
WHERE ACTION_ID = 'RECORD_OUT_PUT_TOLLING';
UPDATE AMC_APP_MENU_CONFIGURATION SET LINK_CALLED = '/metals/loadListOfTollingInProcessStock.action?gridId=... | true |
273ab6c54c43ba42da70afb43bacb75e6b65ef21 | SQL | Youssef404/Avocat | /src/testjdbc/data/Piece.sql | UTF-8 | 248 | 3.09375 | 3 | [] | no_license | create table IF NOT EXISTS piece (
id int auto_increment primary key,
chemin_img varchar(200),
affaire int default null,
constraint fk_audience_piece foreign key(affaire) references affaire(id) ON DELETE SET NULL ON UPDATE CASCADE
) | true |
e2defe3ec511d73d0efb669065c9514aed3a6414 | SQL | ffguass/partmall | /user/user-db/src/main/resources/db.migratiom/V5__Create_exceptionlog_table.sql | UTF-8 | 2,409 | 3.25 | 3 | [] | no_license | DROP TABLE IF EXISTS exception_log;
CREATE TABLE exception_log (
id int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
trace_id varchar(64) NOT NULL COMMENT '链路追踪编号\n *\n * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。',
user_id int(11) NOT NULL COMMENT '用户编号.\n *\n * 当管理员为空时,该值为 {@link ... | true |
448fc4f3181c4fd90c984fb96af778384931f587 | SQL | DataGrip/dumps | /oracle-sakila-db/oracle-additional.sql | UTF-8 | 3,428 | 3.765625 | 4 | [
"BSD-3-Clause"
] | permissive | -- additional database objects
-- checks
create table Simple_Table_with_Checks
(
A number(9) check (A between 13 and 42),
B number(9),
C number(9),
M1 number(9) not null,
M2 number(9),
constraint Simple_Table_with_Checks_BC_ch
check (B > 2 or C > 3),
constraint Simple_Table_with_Checks_M2_nn
check (M2... | true |
99368d95ddeefe466025b3742efa851f6fdc98b7 | SQL | annmcnamara/starting_SQL | /9_1/song_birds.sql | UTF-8 | 258 | 2.828125 | 3 | [] | no_license | -- the names dont have to be the same
-- but the structure (no and type of cols) do
CREATE TABLE bird_Song (
englishname VARCHAR,
country VARCHAR,
latitude DEC,
longitude DEC
);
--dont need public if its the only schema
select * from public.bird_Song | true |
1ceeb212d0e998de23f9a53e15b57b12c7fc7797 | SQL | VlDmVr/test_table | /test.sql | UTF-8 | 4,229 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Фев 12 2017 г., 22:04
-- Версия сервера: 5.5.53
-- Версия PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
2795d45495d34941539a296fa871df73698ffd21 | SQL | yuexihan/Graduate-Exp | /ieee/ETL.sql | UTF-8 | 6,478 | 3.890625 | 4 | [] | no_license |
create table `acemap-xyue1`.`IeeeAfter2014ToFieldOfStudy` as
select IeeeToMag.`PaperID`, PaperField.`FieldOfStudyIDMappedToKeyword`
from (
select ieee2014.`PaperID`, `acemap-stage`.`IdId`.`MagPaperID`
from `acemap-xyue1`.`IeeeAfter2014` ieee2014
inner join `acemap-stage`.`IdId`
on ieee2014.`PaperID` = `acemap-stag... | true |
006d7efe664fc2f89c9ac3ac6121600a60d962e1 | SQL | agustinistmo/amagukphp | /_config/database.sql | UTF-8 | 2,606 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE `mgk_tipo_usuario` (
`tipo_usuario_id` int(10) unsigned NOT NULL auto_increment,
`tipo_usuario_nombre` varchar(50) NOT NULL,
`descripcion` varchar(250) default NULL,
PRIMARY KEY (`tipo_usuario_id`),
UNIQUE KEY `tipo_usuario_nombre` (`tipo_usuario_nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT... | true |
64393ee5974f72697ca36bb42bc612ffc1ae6ac0 | SQL | khafid-gionino/Sistem_informasi_KOS-PHP | /Database/kos.sql | UTF-8 | 4,646 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 31, 2020 at 06:59 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
ee03571a3482deb4f8233afc6cfade7e18e9d400 | SQL | BralexMtz/BasesdeDatos | /bases/Laboratorio/Practica9/complementaria/s-01-fx-main.sql | UTF-8 | 945 | 3.015625 | 3 | [] | no_license | --@Autor(es): Brayan Alexis Martinez Vazquez, Maria Fernanda Maya Ortega
--@Fecha creación: 09/01/2021
--@Descripción: Práctica 09 C
whenever sqlerror exit rollback;
prompt Conectando a SYS
connect sys as sysdba
prompt creando usuario
declare
v_cuenta number;
begin
select count(*) into v_cuenta
from a... | true |
a29b46e6e8e0ea0ebd0220ae4aefe01ee759f20b | SQL | oussamaelbouenani/2BIN_ea_project | /configuration/init.sql | UTF-8 | 2,705 | 3.75 | 4 | [] | no_license | DROP SCHEMA IF EXISTS projet CASCADE;
CREATE SCHEMA projet;
CREATE TABLE projet.clients
(
id_client serial PRIMARY KEY,
nom varchar(50) NOT NULL,
prenom varchar(50) NOT NULL,
code_postal varchar(10) NOT NULL,
ville varchar(50) NOT NULL,
email varchar(50) NOT NULL,
... | true |
3743a4e3dd1f05d0cb5b450e60db95b5adf46f93 | SQL | S87GMIL/e621ng | /script/e6_migration/05_forums.sql | UTF-8 | 2,992 | 3.921875 | 4 | [
"BSD-2-Clause-Views"
] | permissive | -- Forums
drop trigger trg_forum_post_search_update on forum_posts;
CREATE TABLE forum_topics (
id serial NOT NULL,
creator_id integer NOT NULL,
creator_ip_addr inet NOT NULL,
updater_id integer NOT NULL,
title character varying(255) NOT NULL,
response_count integer DEFAULT 0 NOT NUL... | true |
cf1ca66dce092f0c9f2c3053765afced475bf194 | SQL | cssat/sql_dev | /test_annie/Stored Procedures 1566 and 1774/sp_mp_rate_placement_ts.sql | UTF-8 | 508 | 3.4375 | 3 | [] | no_license | DROP PROCEDURE `test_annie`.`sp_mp_rate_placement_ts`;
DELIMITER $$
CREATE DEFINER=`test_annie` PROCEDURE `sp_mp_rate_placement_ts`()
BEGIN
SELECT
CONVERT(cohort_date, DATE) AS 'Month/Year of Placement'
,old_region_cd AS 'Region'
,entry_point AS 'Access Type'
,ROUND(rate_placement, 2) AS 'Scatterplot (Actual Valu... | true |
ce5a0ab824307f8d5e180271756126179d12ffe8 | SQL | SowmyaNagayya/employee_tracker | /db/query.sql | UTF-8 | 94 | 2.703125 | 3 | [
"MIT"
] | permissive | SELECT * FROM main_table
JOIN other_table ON main_table.foreign_key = other_table.primary_key; | true |
91ff6620cff419f01818f724c45d548276c14a3b | SQL | manuelmayr/Switch | /spec/switch/translation/sql/complex/qry6.sql | UTF-8 | 1,691 | 3.828125 | 4 | [] | no_license |
WITH
-- binding due to rownum operator
t0000 (iter2_nat, item4_int, iter5_nat, item1_int, iter8_nat) AS
(SELECT a0000.iter3_nat AS iter2_nat, a0000.item4_int, a0000.iter5_nat,
a0001.item1_int,
ROW_NUMBER () OVER (ORDER BY a0000.iter3_nat ASC, a0000.iter5_nat ASC)
AS iter8_nat
FROM ... | true |
d9ee7332eb1bd187fecd81493611a8a606480083 | SQL | genoufox/sql-scripts | /手游充值消耗1020.sql | UTF-8 | 1,399 | 2.75 | 3 | [] | no_license | create table uid_sy1020_1_result
as
select a.*, b.time_5W,c.time_10W,d.time_20W,e.time_40W,f.time_60W,g.time_100W
from UID_SY1020_1 a
left join (select userid_, min(logtime) time_5W
from bitask.t_000138_log_addvipcost
where newvalue_ >= 500000
group by userid_) b
on ... | true |
c3223ac1c906bda61bd43f58119b9a9ec776f685 | SQL | hw233/gsnkf_server_php | /module/active/doc/active.sql | UTF-8 | 576 | 2.734375 | 3 | [] | no_license | set names utf8;
create table t_active(
uid int unsigned not null comment '用户ID',
point int unsigned not null comment '总积分',
last_point int unsigned not null comment '记录昨天的总积分,用以平台统计核心用户',
update_time int unsigned not null comment '上次更新时间',
va_active blob not null comment 'array(step(哪步),task($task... | true |
4b966af318f014ec047f9e3426120cd15253a590 | SQL | rezequielp/bd2013 | /sql_scripts/triggers.sql | UTF-8 | 673 | 3.5625 | 4 | [] | no_license | USE `bd2013`;
DROP TRIGGER IF EXISTS tuvieja;
DELIMITER $$
USE `bd2013`$$
CREATE TRIGGER tuvieja AFTER INSERT ON offer_spe
FOR EACH ROW
BEGIN
DECLARE is_valid TINYINT(2) UNSIGNED;
SET is_valid = 0;
SELECT 1
FROM special
WHERE requires > (SELECT COUNT(*) AS num_offers
... | true |
e3a8126100387283ec8727dfd102ddcda1b99ef1 | SQL | Rkaufman0427/IT2351 | /Assignment6/JeyanthiAssignment6No3Script.sql | UTF-8 | 722 | 3.53125 | 4 | [] | no_license | -- create a procedure to understand about function in MySQL
-- Created by Jeyanthi Meenakshisundaram, 10/05/2021, Fall 2021
-- **********************************************************
use jeyanthi_guitar_shop;
DELIMITER //
DROP FUNCTION IF EXISTS new_price;
-- function that calculates balance due
DELIMITER //
CREAT... | true |
6d1ba55b33fa20e3a1defba5c09db0432f4f1346 | SQL | imjorge/flynn-discovery | /schema.sql | UTF-8 | 601 | 3.234375 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE clusters (
cluster_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
creator_ip text NOT NULL,
creator_user_agent text NOT NULL,
created_at timestamptz NOT NULL DEFAULT now()
);
CREATE TABLE instances (
instance_id uuid PRIMARY KEY DEFAULT uuid_generate... | true |
ed85fe75f3e21746e38af35a86219ba8d7b72505 | SQL | asu-cis-capstone/sdfc | /DB.sql | UTF-8 | 12,022 | 3.90625 | 4 | [] | no_license | CREATE TABLE `employee` (
`asuID` int(11) NOT NULL,
`asurite` varchar(10) DEFAULT NULL,
`password` varchar(15) NOT NULL,
`lastName` varchar(15) DEFAULT NULL,
`firstName` varchar(15) DEFAULT NULL,
`position` varchar(15) DEFAULT NULL,
`active` bit(1) DEFAULT NULL,
`manager` int(11) DEFAULT NULL,
PRIMARY... | true |
ba0576172a6fb6de14151a84a3290aa817f0866e | SQL | Blue-Ball/TazzerClean | /database-upgrade/2021_7_31_Leo_database_upgrade_services_table.sql | UTF-8 | 620 | 2.921875 | 3 | [] | no_license | ALTER TABLE `services`
CHANGE `serviceamounttype` `serviceamounttype` ENUM('Fixed','Hourly','Monthly') CHARSET latin1 COLLATE latin1_swedish_ci DEFAULT 'Fixed' NOT NULL,
ADD COLUMN `measurement_value` FLOAT NOT NULL AFTER `serviceamounttype`,
ADD COLUMN `measurement_type` ENUM('none','per sqft','tones','cm','m... | true |
79a91da18212f8374f12f43174e48c7added8a62 | SQL | RamanpreetShergill/programming-database01 | /program database 01/Ramanpreet_Shergill_7282353.sql | WINDOWS-1252 | 5,101 | 4.59375 | 5 | [] | no_license | --Ramanpreet Kaur Shergill
--7282353
--Assignment 2
PRINT 'Ramanpreet Kaur Shergill
7282353
Assignment 2'
PRINT''
--Problem 1
--List the number of characters in firstName aliased as First Name Length for all persons. Show each column length only once. Sort the results by number of characters in descending order.
PRINT... | true |
32d88b79796fd07015c3d3b2e86855a095aa1084 | SQL | saikavya/GoogleAppengine | /GOOGLESQL.sql | UTF-8 | 702 | 2.828125 | 3 | [] | no_license | NAME: SAI KAVYA, DUKKIPATI
UTA ID: 1000980778
CREATE SCHEMA:
create schema cloud;
use cloud;
CREATE TABLE:
create table TABLENAME(a1 varchar(40),a2 varchar(40),a3 varchar(40),a4 varchar(40),a5 varchar(40),
a6 varchar(40),a7 varchar(40),a8 varchar(40),a9 varchar(40),a10 varchar(40),a11 varchar(40),
va12 varchar(40),a... | true |
95a2dbed5737091fd4f918f820c950d424445b28 | SQL | jshin1394/SoccerDB | /Procedure_And_Views.sql | UTF-8 | 12,026 | 4.5625 | 5 | [] | no_license | -- 1. Best Ranking
DROP VIEW Best_Rank;
CREATE VIEW Best_Rank AS
SELECT S.Club, MIN(S.Rank) AS Best_Rank,
MIN(S.Season) AS Season
FROM League_standing S
GROUP BY S.Club;
--2. Most Winning Team
DROP VIEW Most_Winning;
CREATE VIEW Most_Winning AS
SELECT MAX(L.League_name) AS League, MAX(T.Club) AS Club,
MAX(T.Win) AS W... | true |
3c75a620cbe26ad62375c2ebb41440dab9d7aa3e | SQL | jzc15/SqlProject | /test.1.sql | UTF-8 | 766 | 3.296875 | 3 | [] | no_license | CREATE DATABASE test_db;
USE test_db;
CREATE TABLE test_table (col1 INT(10), col2 INT(5), col4 VARCHAR(200));
SHOW TABLES;
DESC test_table;
INSERT INTO test_table VALUES (2, 3, '123'), (4, 5, 'abc'), (5, 2, 'qwer'), (5, 2, NULL);
DELETE FROM test_table WHERE col1 = 2;
DELETE FROM test_table WHERE col1 = 2;
DELETE FROM... | true |
c7b237f519377b3b3a2992e9861247c6bcdc3791 | SQL | wastewatchers/backend | /table.sql | UTF-8 | 933 | 3.5625 | 4 | [] | no_license | drop table ratings;
drop table users;
drop table product_images;
drop table products;
--drop type recyclability;
--create type recyclability as enum ('non_recyclable', 'recyclable', 'compostable');
--create table users(
-- id uuid primary key,
-- username text unique not null
--);
create table products(
id... | true |
3189eb4861000a444fa720936d9b4a80f2e41733 | SQL | sneexz/dal_example | /app_company.sql | UTF-8 | 2,956 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 16, 2016 at 01:56 AM
-- Server version: 5.5.42
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
5f83b6f38a5c2819810ddc8b9afd60f1062da438 | SQL | Marcll123/ColorPrint | /colorprint.sql | UTF-8 | 33,275 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-06-2019 a las 20:10:10
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
31776020cbae30db8e80dadfdfd4988d41c7e772 | SQL | devkamilgrzybek/dvd_app | /hibernate/sql/database.sql | UTF-8 | 2,867 | 3.890625 | 4 | [] | no_license | DROP TABLE IF EXISTS actor CASCADE;
CREATE TABLE actor (
actor_id SERIAL PRIMARY KEY,
first_name VARCHAR(45) NOT NULL,
last_name VARCHAR(45) NOT NULL,
last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
DROP TABLE IF EXISTS category CASCADE;
CREATE TABLE category (
category_id SERIAL PRIMARY KEY,
n... | true |
d4a435e9cf12dc351a91fb5974c9266351320396 | SQL | MarsX1e/Sakila_from_MySQL | /7.sql | UTF-8 | 187 | 2.96875 | 3 | [] | no_license | SELECT film.title, film.description, film.release_year, film.rating, film.special_features, category as genre
from film
join film_list on film.title=film_list.title
where rental_rate=2.99 | true |
eb63a53bbb6ebbf6c63dcc0fac898c7f26ed3385 | SQL | s16007/DataBase2 | /1109/1109.2.sql | UTF-8 | 566 | 2.640625 | 3 | [] | no_license | create table title
(
title_id number(10) constraint title_title_id_pk primary key,
title varchar2(60) constraint title_title_nn not null,
description varchar2(400) constraint title_description_nn not null,
rating varchar2(4) constraint title_rating_ck
check(rating = 'G' or rating = 'PG' or rating = 'R' or rating = 'NC1... | true |
53335475b4ad95adc3a4279ff50135ba788cd7ad | SQL | sikale/wisdompcb | /二层/鸿泰源代码/acessexe/file/EP124退货入仓退货单查询.sql | GB18030 | 1,162 | 3.0625 | 3 | [] | no_license | --EP124˻˻ѯ
select data0098.rma_number,data0098.rma_date,DATA0098.ANALYSIS_CODE_1,data0098.QTY_AUTH,data0098.qty_recd,
isnull(data0098.QTY_AUTH,0)-isnull(data0098.qty_recd,0) as Qty_SY,
data0098.RMA_STATUS,data0098.rkey,data0098.customer_ptr,data0098.customer_part_ptr,
data0060.sales_order,data0098.shipment_ptr,data00... | true |
007ff5d27248f50370b4fb510385125f594775fa | SQL | patrickmasini/Northwind | /Northwind_Data_Warehouse.sql | UTF-8 | 1,929 | 3.015625 | 3 | [] | no_license |
CREATE TABLE Order_Fact (
order_id smallint NOT NULL,
customer_id bpchar COLLATE pg_catalog."default",
order_date date,
employee_id smallint NOT NULL,
product_id smallint NOT NULL,
required_date date,
shipped_date date,
dateid integer NOT NULL,
ship_via smallint NOT NULL,
freight real NOT NULL,
... | true |
2d7d798f21b21171fe89f098d7d09d61b79ffe4d | SQL | danielsunzhongyuan/my_leetcode_in_python | /rank_scores_178.sql | UTF-8 | 326 | 3.578125 | 4 | [
"Apache-2.0"
] | permissive | select
s2.Score,
(select count(distinct s1.score) + 1 as counts
from Scores s1
where s1.score > s2.score
) as Rank
from Scores s2
order by 2
;
select sc.Score,
(Select count(*)+1 from (select distinct (Score) from Scores)
as uniqeScores where Score > sc.Score) as rank
from Scores sc order by sc.Score ... | true |
eea5300b86848f86eebab1d2ecd838c451e20b83 | SQL | truongquocphap/C0321G1_truongquocphap_module | /module3/bai5_Index_PS_SQLView/thuc_hanh/view_SQL.sql | UTF-8 | 372 | 3.171875 | 3 | [] | no_license | use classicmodels;
create view customer_view as
select customerNumber,customerName,phone
from customers;
select *
from customer_view;
-- cập nhật view
create or replace view customer_view as
select customerNumber, customerName , contactFirstName, contactLastName
from customers
where city='Nantes';
select * from cust... | true |
57eebe8da669fe5a0dc66ebf65d67a00a563e594 | SQL | advaitpatel/CSC-453-Database-Technology | /orac_allfiles/oracle_sql/ex_solutions/ch04/ex4-05.sql | UTF-8 | 292 | 3.609375 | 4 | [] | no_license | SELECT v1.vendor_id, v1.vendor_name,
v1.vendor_contact_first_name || ' ' || v1.vendor_contact_last_name AS contact_name
FROM vendors v1 JOIN vendors v2
ON v1.vendor_id <> v2.vendor_id
WHERE v1.vendor_contact_last_name = v2.vendor_contact_last_name
ORDER BY v1.vendor_contact_last_name
| true |
ff22be9827e0e02cec393b91bb5052555c2c9074 | SQL | gon1958/minibso | /minibso/create/exp/estmsize/rowcnt.sql | UTF-8 | 2,913 | 3.609375 | 4 | [] | no_license | create or replace function redu_calcStat1 return number as
n_rows number;
retval number := 0;
tabCount number := 10;
begin
delete redu_stat where end_date is null;
commit;
for c in (select view_name from user_views where view_name like 'REDU!_%' escape '!'
and view_name not in (select view_name from redu... | true |
b0ec752cfa196ad13fc60bcfe045af8d8d77f878 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day18/select1351.sql | UTF-8 | 262 | 2.921875 | 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='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['1431','4065','2214','4212','5231','3214','2226','2088','4081','4054'])
| true |
2ab53bfa7fd183980d2559f3ab9e670d3345dd8a | SQL | yespickmeup/VWWS | /src/vwws/sql/2018_november.sql | UTF-8 | 15,534 | 3.171875 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: Ronescape
* Created: Nov 21, 2018
*/
drop table if exists customers;
create table customers(
id int auto_increment ... | true |
09d889bd2157895b68e58576d32af2a0d75c13d1 | SQL | batorus/skillmanager | /database/skillmanagement.sql | UTF-8 | 8,618 | 3.046875 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.6.17 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*... | true |
44e50006d82df77fc7036bcb23c3cb000161bcb4 | SQL | Zhengzhibo1/SQL-practice | /12_获取所有部门中当前员工薪水最高的相关信息/solution.sql | UTF-8 | 1,143 | 4.59375 | 5 | [] | no_license | /*
获取所有部门中当前(dept_emp.to_date = '9999-01-01')员工当前(salaries.to_date='9999-01-01')薪水最高的相关信息,给出dept_no, emp_no以及其对应的salary
CREATE TABLE `dept_emp` (
`emp_no` int(11) NOT NULL,
`dept_no` char(4) NOT NULL,
`from_date` date NOT NULL,
`to_date` date NOT NULL,
PRIMARY KEY (`emp_no`,`dept_no`));
CREATE TABLE `salaries` (
`emp_n... | true |
34b584fe16e64b2d3d0da5753d2678200dcf5260 | SQL | Bebopskull/bootcampx | /4_queries/Average_Cohort_Assistance_Time.sql | UTF-8 | 466 | 3.390625 | 3 | [] | no_license | -- Average Cohort Assistance Time
select avg( assistance_requests.started_at - assistance_requests.created_at ) as duration
from assistance_requests
join students on students.id = student_id
join teachers on teachers.id = teacher_id
join assignments on assignments.id = assignment_id
join cohorts on cohorts.id = stud... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.